Top Description Methods
org.wildfly.common.iteration

public Interface EnumerationIterator<E>

extends Enumeration<E>, Iterator<E>
Known Direct Implementers
org.wildfly.common.array.ArrayIterator
Imports
java.util.Enumeration, .Iterator, .NoSuchElementException

An enumeration which is also an iterator.
Author
David M. Lloyd

Method Summary

Modifier and TypeMethod and Description
public default boolean

Returns:

true if there are more elements, false otherwise
hasMoreElements
()

Implements java.util.Enumeration.hasMoreElements.

Determine if there are more elements to iterate over in the direction of this iterator.
public default E

Returns:

the next element
nextElement
()

Implements java.util.Enumeration.nextElement.

Get the next element in the direction of this iterator.
public static <
the element type
E
>
EnumerationIterator<E>

Returns:

the enumeration iterator
over
(E
the element
item
)

Get an enumeration iterator over one element.

Inherited from java.util.Enumeration:
asIterator
Inherited from java.util.Iterator:
forEachRemaininghasNextnextremove

Method Detail

hasMoreElementsback to summary
public default boolean hasMoreElements()

Implements java.util.Enumeration.hasMoreElements.

Determine if there are more elements to iterate over in the direction of this iterator.

Returns:boolean

true if there are more elements, false otherwise

nextElementback to summary
public default E nextElement()

Implements java.util.Enumeration.nextElement.

Get the next element in the direction of this iterator.

Returns:E

the next element

overback to summary
public static <E> EnumerationIterator<E> over(E item)

Get an enumeration iterator over one element.

Parameters
<E>
the element type
item:E

the element

Returns:EnumerationIterator<E>

the enumeration iterator