Package com.day.util
Class IteratorEnumeration
- java.lang.Object
-
- com.day.util.IteratorEnumeration
-
- All Implemented Interfaces:
java.util.Enumeration
public class IteratorEnumeration extends java.lang.Object implements java.util.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(java.util.Iterator iter)
Create a newIteratorEnumeration
given anIterator
that backs up theEnumeration
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
hasMoreElements()
Tests if this enumeration contains more elements.java.lang.Object
nextElement()
Returns the next element of this enumeration if this enumeration object has at least one more element to provide.
-
-
-
Method Detail
-
hasMoreElements
public boolean hasMoreElements()
Tests if this enumeration contains more elements.- Specified by:
hasMoreElements
in interfacejava.util.Enumeration
- Returns:
true
if and only if this enumeration object contains at least one more element to provide;false
otherwise.
-
nextElement
public java.lang.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 interfacejava.util.Enumeration
- Returns:
- the next element of this enumeration.
-
-