net.sf.molae.pipe.basic
Class EnumerationIterator<E>

java.lang.Object
  extended by net.sf.molae.pipe.basic.EnumerationIterator<E>
All Implemented Interfaces:
Iterator<E>

public class EnumerationIterator<E>
extends Object
implements Iterator<E>

Adapter to make Enumeration instances appear to be Iterator instances.

Since:
2.0

Constructor Summary
EnumerationIterator(Enumeration<E> base)
           
 
Method Summary
 boolean hasNext()
          Returns true if the base enumeration has more elements.
 E next()
          Returns the next object from the base enumeration.
 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
 

Constructor Detail

EnumerationIterator

public EnumerationIterator(Enumeration<E> base)
Method Detail

hasNext

public boolean hasNext()
Returns true if the base enumeration has more elements.

Specified by:
hasNext in interface Iterator<E>
Returns:
true if the base enumeration has more elements

next

public E next()
Returns the next object from the base enumeration.

Specified by:
next in interface Iterator<E>
Returns:
the next object from the base enumeration

remove

public void remove()
Removes from the underlying collection the last element returned by the iterator. Not implemented.

Specified by:
remove in interface Iterator<E>
Throws:
UnsupportedOperationException - always