java.lang.Object
Util.Collections.UnmodifiableIterator
Util.Collections.EnumerationIterator
- All Implemented Interfaces:
- java.util.Iterator
- public class EnumerationIterator
- extends UnmodifiableIterator
- implements java.util.Iterator
An EnumerationIterator converts an Enumeration
into an Iterator.
- Version:
- $Id: EnumerationIterator.java,v 1.2 2003/05/12 10:05:21 joewhaley Exp $
|
Method Summary |
boolean |
hasNext()
Tests whether there are elements remaining in the collection. |
java.lang.Object |
next()
Obtain the next element in the collection. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
e
private final java.util.Enumeration e
EnumerationIterator
public EnumerationIterator(java.util.Enumeration e)
- Creates a
EnumerationIterator.
hasNext
public boolean hasNext()
- Description copied from interface:
java.util.Iterator
- Tests whether there are elements remaining in the collection. In other
words, calling
next() will not throw an exception.
- Specified by:
hasNext in interface java.util.Iterator- Specified by:
hasNext in class UnmodifiableIterator
next
public java.lang.Object next()
- Description copied from interface:
java.util.Iterator
- Obtain the next element in the collection.
- Specified by:
next in interface java.util.Iterator- Specified by:
next in class UnmodifiableIterator