Package de.intarsys.tools.collection
Class EnumerationIterator
- java.lang.Object
-
- de.intarsys.tools.collection.EnumerationIterator
-
- All Implemented Interfaces:
java.util.Iterator
public class EnumerationIterator extends java.lang.Object implements java.util.IteratorWraps an enumeration into an Iterator API.
-
-
Constructor Summary
Constructors Constructor Description EnumerationIterator(java.util.Enumeration e)Create an Iterator over an enumeration.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.util.EnumerationgetEnumeration()booleanhasNext()Returntrueif underlying enumeration still has elements.java.lang.Objectnext()Return the next element from the underlying enumeration.voidremove()
-
-
-
Method Detail
-
getEnumeration
protected java.util.Enumeration getEnumeration()
-
hasNext
public boolean hasNext()
Returntrueif underlying enumeration still has elements.- Specified by:
hasNextin interfacejava.util.Iterator- Returns:
trueif underlying enumeration still has elements.
-
next
public java.lang.Object next()
Return the next element from the underlying enumeration.- Specified by:
nextin interfacejava.util.Iterator- Returns:
- the next element from the underlying enumeration.
- Throws:
java.util.NoSuchElementException
-
remove
public void remove()
- Specified by:
removein interfacejava.util.Iterator
-
-