org.objectweb.jonathan.libs.helpers
Class IteratorAdapter
java.lang.Object
|
+--org.objectweb.jonathan.libs.helpers.IteratorAdapter
- All Implemented Interfaces:
- Iterator
- public class IteratorAdapter
- extends Object
- implements Iterator
Implements a bridge between an Enumeration and an
Iterator.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
IteratorAdapter
public IteratorAdapter(Enumeration _e)
- Creates a new IteratorAdapter, using the provided enumeration.
- Parameters:
_e - an enumeration.
hasNext
public boolean hasNext()
- Returns the result of calling
hasMoreElements() on the encapsulated enumeration.
- Specified by:
hasNext in interface Iterator
- Returns:
- true if there is a next element in the enumeration.
next
public Object next()
- Returns the result of calling
nextElement() on the encapsulated enumeration.
- Specified by:
next in interface Iterator
- Returns:
- the next element in the enumeration.
remove
public void remove()
- Can't be implemented: throws an
InternalException.
- Specified by:
remove in interface Iterator