Package com.jalios.util
Class Enumerator
- java.lang.Object
-
- com.jalios.util.Enumerator
-
- All Implemented Interfaces:
java.util.Iterator
public class Enumerator extends java.lang.Object implements java.util.IteratorThis class wraps an enumeration around an iterator.- Author:
- Olivier Dedieu
-
-
Constructor Summary
Constructors Constructor Description Enumerator(java.util.Enumeration enu)Creates an iterator wraps around the given enumeration
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanhasNext()Checks whether there are more elements to be processed.java.lang.Objectnext()Returns the next element in the iteration.voidremove()Removes from the underlying collection the last element returned by the iterator.
-
-
-
Method Detail
-
hasNext
public final boolean hasNext()
Checks whether there are more elements to be processed.- Specified by:
hasNextin interfacejava.util.Iterator- Returns:
- rue if the iteration is not completed.
- See Also:
Enumeration.hasMoreElements()
-
next
public final java.lang.Object next()
Returns the next element in the iteration. It retrieves the next data and returns the owner of this data.- Specified by:
nextin interfacejava.util.Iterator- Returns:
- the next object.
- See Also:
Enumeration.nextElement()
-
remove
public final void remove() throws java.lang.UnsupportedOperationExceptionRemoves from the underlying collection the last element returned by the iterator. This operation is not implemented.- Specified by:
removein interfacejava.util.Iterator- Throws:
java.lang.UnsupportedOperationException
-
-