Package com.day.util
Class IteratorEnumeration
java.lang.Object
com.day.util.IteratorEnumeration
- All Implemented Interfaces:
Enumeration
An
IteratorEnumeration provides a one-to-one mapping
from the pre Java 2 Enumeration to the Java 2
Iterator- Since:
- antbear
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanTests if this enumeration contains more elements.Returns the next element of this enumeration if this enumeration object has at least one more element to provide.Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Enumeration
asIterator
-
Constructor Details
-
IteratorEnumeration
- Parameters:
iter- the iterator
-
-
Method Details
-
hasMoreElements
public boolean hasMoreElements()Tests if this enumeration contains more elements.- Specified by:
hasMoreElementsin interfaceEnumeration- Returns:
trueif and only if this enumeration object contains at least one more element to provide;falseotherwise.
-
nextElement
Returns the next element of this enumeration if this enumeration object has at least one more element to provide.- Specified by:
nextElementin interfaceEnumeration- Returns:
- the next element of this enumeration.
-