harpoon.Util
Class EnumerationIterator<E>

java.lang.Object
  extended by net.cscott.jutil.UnmodifiableIterator<E>
      extended by harpoon.Util.EnumerationIterator<E>
All Implemented Interfaces:
Iterator<E>

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

An EnumerationIterator converts an Enumeration into an Iterator.

Version:
$Id: EnumerationIterator.java,v 1.5 2004/02/08 01:56:15 cananian Exp $
Author:
C. Scott Ananian <cananian@alumni.princeton.edu>

Constructor Summary
EnumerationIterator(Enumeration<E> e)
          Creates a EnumerationIterator.
 
Method Summary
 boolean hasNext()
           
 E next()
           
 
Methods inherited from class net.cscott.jutil.UnmodifiableIterator
proxy, 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> e)
Creates a EnumerationIterator.

Method Detail

hasNext

public boolean hasNext()
Specified by:
hasNext in interface Iterator<E>
Specified by:
hasNext in class UnmodifiableIterator<E>

next

public E next()
Specified by:
next in interface Iterator<E>
Specified by:
next in class UnmodifiableIterator<E>