harpoon.Util
Class EnumerationIterator

java.lang.Object
  |
  +--harpoon.Util.UnmodifiableIterator
        |
        +--harpoon.Util.EnumerationIterator
All Implemented Interfaces:
Iterator

public class EnumerationIterator
extends UnmodifiableIterator
implements Iterator

An EnumerationIterator converts an Enumeration into an Iterator.

Version:
$Id: EnumerationIterator.java,v 1.2 2002/02/25 21:08:45 cananian Exp $
Author:
C. Scott Ananian <cananian@alumni.princeton.edu>

Constructor Summary
EnumerationIterator(Enumeration e)
          Creates a EnumerationIterator.
 
Method Summary
 boolean hasNext()
          Returns true if the iteration has more elements.
 Object next()
          Returns the next element in the iteration.
 
Methods inherited from class harpoon.Util.UnmodifiableIterator
remove
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Iterator
remove
 

Constructor Detail

EnumerationIterator

public EnumerationIterator(Enumeration e)
Creates a EnumerationIterator.

Method Detail

hasNext

public boolean hasNext()
Description copied from class: UnmodifiableIterator
Returns true if the iteration has more elements.

Specified by:
hasNext in interface Iterator
Specified by:
hasNext in class UnmodifiableIterator
Returns:
true if the iterator has more elements.

next

public Object next()
Description copied from class: UnmodifiableIterator
Returns the next element in the iteration.

Specified by:
next in interface Iterator
Specified by:
next in class UnmodifiableIterator