Package com.day.util
Class IteratorEnumeration
- java.lang.Object
-
- com.day.util.IteratorEnumeration
-
- All Implemented Interfaces:
Enumeration
public class IteratorEnumeration extends Object implements Enumeration
AnIteratorEnumerationprovides a one-to-one mapping from the pre Java 2Enumerationto the Java 2Iterator- Since:
- antbear
-
-
Constructor Summary
Constructors Constructor Description IteratorEnumeration(Iterator iter)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanhasMoreElements()Tests if this enumeration contains more elements.ObjectnextElement()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, wait
-
Methods inherited from interface java.util.Enumeration
asIterator
-
-
-
-
Constructor Detail
-
IteratorEnumeration
public IteratorEnumeration(Iterator iter)
- Parameters:
iter- the iterator
-
-
Method Detail
-
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
public Object 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.
-
-