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 EnumerationbooleanhasNext()Returntrueif underlying enumeration still has elements.next()Return the next element from the underlying enumeration.voidremove()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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()Returntrueif underlying enumeration still has elements. -
next
Return the next element from the underlying enumeration.- Specified by:
nextin interfaceIterator- Returns:
- the next element from the underlying enumeration.
- Throws:
NoSuchElementException
-
remove
public void remove()
-