Package com.day.util
Class IteratorEnumeration
- java.lang.Object
-
- com.day.util.IteratorEnumeration
-
- All Implemented Interfaces:
Enumeration
public class IteratorEnumeration extends Object implements Enumeration
AnIteratorEnumeration
provides a one-to-one mapping from the pre Java 2Enumeration
to 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 boolean
hasMoreElements()
Tests if this enumeration contains more elements.Object
nextElement()
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:
hasMoreElements
in interfaceEnumeration
- Returns:
true
if and only if this enumeration object contains at least one more element to provide;false
otherwise.
-
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:
nextElement
in interfaceEnumeration
- Returns:
- the next element of this enumeration.
-
-