Package org.wildfly.common.iteration
Interface EnumerationIterator<E>
- All Superinterfaces:
Enumeration<E>,Iterator<E>
- All Known Implementing Classes:
ArrayIterator
An enumeration which is also an iterator.
- Author:
- David M. Lloyd
-
Method Summary
Modifier and TypeMethodDescriptiondefault booleanDetermine if there are more elements to iterate over in the direction of this iterator.default EGet the next element in the direction of this iterator.static <E> EnumerationIterator<E>over(E item) Get an enumeration iterator over one element.Methods inherited from interface java.util.Enumeration
asIteratorMethods inherited from interface java.util.Iterator
forEachRemaining, hasNext, next, remove
-
Method Details
-
hasMoreElements
default boolean hasMoreElements()Determine if there are more elements to iterate over in the direction of this iterator.- Specified by:
hasMoreElementsin interfaceEnumeration<E>- Returns:
trueif there are more elements,falseotherwise
-
nextElement
Get the next element in the direction of this iterator.- Specified by:
nextElementin interfaceEnumeration<E>- Returns:
- the next element
-
over
Get an enumeration iterator over one element.- Type Parameters:
E- the element type- Parameters:
item- the element- Returns:
- the enumeration iterator
-