org.crosswire.common.util
Class IteratorEnumeration

java.lang.Object
  extended by org.crosswire.common.util.IteratorEnumeration
All Implemented Interfaces:
Enumeration

public final class IteratorEnumeration
extends Object
implements Enumeration

Convert an Iterator into a Enumeration.

The only real difference between the 2 is the naming and that Enumeration does not have the delete method.

Author:
Joe Walker [joe at eireneh dot com]
See Also:
for license details.
The copyright to this program is held by it's authors.

Field Summary
private  Iterator it
          The Iterator that we are proxying to
 
Constructor Summary
IteratorEnumeration(Iterator it)
          Create an Enumeration that proxies to an Iterator
 
Method Summary
 boolean hasMoreElements()
          Returns true if the iteration has more elements
 Object nextElement()
          Returns the next element in the interation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

it

private Iterator it
The Iterator that we are proxying to

Constructor Detail

IteratorEnumeration

public IteratorEnumeration(Iterator it)
Create an Enumeration that proxies to an Iterator

Method Detail

hasMoreElements

public boolean hasMoreElements()
Returns true if the iteration has more elements

Specified by:
hasMoreElements in interface Enumeration

nextElement

public Object nextElement()
                   throws NoSuchElementException
Returns the next element in the interation

Specified by:
nextElement in interface Enumeration
Throws:
NoSuchElementException

Copyright ยจ 2003-2006