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
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
-
-
Constructor Summary
Constructors Constructor Description IteratorEnumeration(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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
hasMoreElements()
T
nextElement()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Enumeration
asIterator
-
-
-
-
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.
-
-
Method Detail
-
hasMoreElements
public boolean hasMoreElements()
- Specified by:
hasMoreElements
in interfaceEnumeration<T>
-
nextElement
public T nextElement()
- Specified by:
nextElement
in interfaceEnumeration<T>
-
-