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.Iterator
This class wraps an enumeration around an iterator.- Version:
- $Revision: 14756 $
- Author:
- Olivier Dedieu
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
REVISION
-
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 boolean
hasNext()
Checks whether there are more elements to be processed.java.lang.Object
next()
Returns the next element in the iteration.void
remove()
Removes from the underlying collection the last element returned by the iterator.
-
-
-
Field Detail
-
REVISION
public static final java.lang.String REVISION
- See Also:
- Constant Field Values
-
-
Method Detail
-
hasNext
public final boolean hasNext()
Checks whether there are more elements to be processed.- Specified by:
hasNext
in 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:
next
in interfacejava.util.Iterator
- Returns:
- the next object.
- See Also:
Enumeration.nextElement()
-
remove
public final void remove() throws java.lang.UnsupportedOperationException
Removes from the underlying collection the last element returned by the iterator. This operation is not implemented.- Specified by:
remove
in interfacejava.util.Iterator
- Throws:
java.lang.UnsupportedOperationException
-
-