Class CollectionTools.IteratorEnumeration<T>

  • Type Parameters:
    T - The type of this Enumeration.
    All Implemented Interfaces:
    Enumeration<T>
    Enclosing class:
    CollectionTools

    public static class CollectionTools.IteratorEnumeration<T>
    extends Object
    implements Enumeration<T>
    An enumeration wrapping one or several iterators (and enumerations), i. e. the enumeration just forwards to the underlying iterator(s) (and enumeration(s)). As soon as one iterator has been retrieved completely, the enumeration will forward to the next iterator.
    See Also:
    Iterator
    • Field Detail

      • iterator

        protected final Iterator<? extends T>[] iterator
        The iterator(s) providing the elements of this enumeration.
    • Constructor Detail

      • IteratorEnumeration

        @SafeVarargs
        public IteratorEnumeration​(Iterator<? extends T> iterator,
                                   Enumeration<? extends T>... enumerations)
        Creates a new enumeration for the designated iterator and the designated enumeration(s).
        Parameters:
        iterator - The iterator providing elements of this enumeration.
        enumerations - The enumeration(s) providing more elements of this enumeration.
      • IteratorEnumeration

        @SafeVarargs
        public IteratorEnumeration​(Iterator<? extends T>[] iterator,
                                   Enumeration<? extends T>... enumerations)
        Creates a new enumeration for the designated iterator(s) and the designated enumeration(s).
        Parameters:
        iterator - The iterator(s) providing elements of this enumeration.
        enumerations - The enumeration(s) providing more elements of this enumeration.