com.jalios.util
Class Enumerator

java.lang.Object
  extended by com.jalios.util.Enumerator
All Implemented Interfaces:
Iterator

public class Enumerator
extends Object
implements Iterator

This class wraps an enumeration around an iterator.

Version:
$Revision: 14756 $
Author:
Olivier Dedieu

Field Summary
static String REVISION
           
 
Constructor Summary
Enumerator(Enumeration enu)
          Creates an iterator wraps around the given enumeration
 
Method Summary
 boolean hasNext()
          Checks whether there are more elements to be processed.
 Object next()
          Returns the next element in the iteration.
 void remove()
          Removes from the underlying collection the last element returned by the iterator.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

REVISION

public static final String REVISION
See Also:
Constant Field Values
Constructor Detail

Enumerator

public Enumerator(Enumeration enu)
Creates an iterator wraps around the given enumeration

Parameters:
enu - enumeration on the data.
Method Detail

hasNext

public final boolean hasNext()
Checks whether there are more elements to be processed.

Specified by:
hasNext in interface Iterator
Returns:
rue if the iteration is not completed.
See Also:
Enumeration.hasMoreElements()

next

public final 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 interface Iterator
Returns:
the next object.
See Also:
Enumeration.nextElement()

remove

public final void remove()
                  throws UnsupportedOperationException
Removes from the underlying collection the last element returned by the iterator. This operation is not implemented.

Specified by:
remove in interface Iterator
Throws:
UnsupportedOperationException


Copyright © 2001-2010 Jalios SA. All Rights Reserved.