Package de.intarsys.tools.collection
Class EnumerationIterator
java.lang.Object
de.intarsys.tools.collection.EnumerationIterator
- All Implemented Interfaces:
Iterator
Wraps an enumeration into an Iterator API.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected Enumeration
boolean
hasNext()
Returntrue
if underlying enumeration still has elements.next()
Return the next element from the underlying enumeration.void
remove()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.Iterator
forEachRemaining
-
Constructor Details
-
EnumerationIterator
Create an Iterator over an enumeration.- Parameters:
e
- The enumeration to be iterated.
-
-
Method Details
-
getEnumeration
-
hasNext
public boolean hasNext()Returntrue
if underlying enumeration still has elements. -
next
Return the next element from the underlying enumeration.- Specified by:
next
in interfaceIterator
- Returns:
- the next element from the underlying enumeration.
- Throws:
NoSuchElementException
-
remove
public void remove()
-