Package de.aristaflow.adept2.util
Class CollectionTools.IteratorEnumeration<T>
java.lang.Object
de.aristaflow.adept2.util.CollectionTools.IteratorEnumeration<T>
- Type Parameters:
T- The type of thisEnumeration.
- All Implemented Interfaces:
Enumeration<T>
- Enclosing class:
- CollectionTools
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:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionIteratorEnumeration(Iterator<? extends T>[] iterator, Enumeration<? extends T>... enumerations) Creates a new enumeration for the designated iterator(s) and the designated enumeration(s).IteratorEnumeration(Iterator<? extends T> iterator, Enumeration<? extends T>... enumerations) Creates a new enumeration for the designated iterator and the designated enumeration(s). -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Enumeration
asIterator
-
Field Details
-
iterator
The iterator(s) providing the elements of this enumeration.
-
-
Constructor Details
-
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.
-
-
Method Details
-
hasMoreElements
public boolean hasMoreElements()- Specified by:
hasMoreElementsin interfaceEnumeration<T>
-
nextElement
- Specified by:
nextElementin interfaceEnumeration<T>
-