org.crosswire.common.util
Class IteratorEnumeration<E>
java.lang.Object
org.crosswire.common.util.IteratorEnumeration<E>
- Type Parameters:
E
- The type of the elements returned by this iterator
- All Implemented Interfaces:
- Enumeration<E>
public final class IteratorEnumeration<E>
- extends Object
- implements Enumeration<E>
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
- See Also:
The GNU Lesser General Public License for details.
Field Summary |
private Iterator<E> |
it
The Iterator that we are proxying to |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
it
private Iterator<E> it
- The Iterator that we are proxying to
IteratorEnumeration
public IteratorEnumeration(Iterator<E> it)
- Create an Enumeration that proxies to an Iterator.
- Parameters:
it
- the iterator to wrap.
hasMoreElements
public boolean hasMoreElements()
- Specified by:
hasMoreElements
in interface Enumeration<E>
nextElement
public E nextElement()
throws NoSuchElementException
- Specified by:
nextElement
in interface Enumeration<E>
- Throws:
NoSuchElementException