Package org.wildfly.common.iteration
Interface EnumerationIterator<E>
-
- All Superinterfaces:
java.util.Enumeration<E>
,java.util.Iterator<E>
- All Known Implementing Classes:
ArrayIterator
public interface EnumerationIterator<E> extends java.util.Enumeration<E>, java.util.Iterator<E>
An enumeration which is also an iterator.- Author:
- David M. Lloyd
-
-
Method Summary
All Methods Static Methods Instance Methods Default Methods Modifier and Type Method Description default boolean
hasMoreElements()
Determine if there are more elements to iterate over in the direction of this iterator.default E
nextElement()
Get the next element in the direction of this iterator.static <E> EnumerationIterator<E>
over(E item)
Get an enumeration iterator over one element.
-
-
-
Method Detail
-
hasMoreElements
default boolean hasMoreElements()
Determine if there are more elements to iterate over in the direction of this iterator.- Specified by:
hasMoreElements
in interfacejava.util.Enumeration<E>
- Returns:
true
if there are more elements,false
otherwise
-
nextElement
default E nextElement()
Get the next element in the direction of this iterator.- Specified by:
nextElement
in interfacejava.util.Enumeration<E>
- Returns:
- the next element
-
over
static <E> EnumerationIterator<E> over(E item)
Get an enumeration iterator over one element.- Type Parameters:
E
- the element type- Parameters:
item
- the element- Returns:
- the enumeration iterator
-
-