org.objectweb.jonathan.libs.helpers
Class IteratorAdapter

java.lang.Object
  extended byorg.objectweb.jonathan.libs.helpers.IteratorAdapter
All Implemented Interfaces:
java.util.Iterator

public class IteratorAdapter
extends java.lang.Object
implements java.util.Iterator

Implements a bridge between an Enumeration and an Iterator.


Constructor Summary
IteratorAdapter(java.util.Enumeration _e)
          Creates a new IteratorAdapter, using the provided enumeration.
 
Method Summary
 boolean hasNext()
          Returns the result of calling hasMoreElements() on the encapsulated enumeration.
 java.lang.Object next()
          Returns the result of calling nextElement() on the encapsulated enumeration.
 void remove()
          Can't be implemented: throws an InternalException.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IteratorAdapter

public IteratorAdapter(java.util.Enumeration _e)
Creates a new IteratorAdapter, using the provided enumeration.

Parameters:
_e - an enumeration.
Method Detail

hasNext

public boolean hasNext()
Returns the result of calling hasMoreElements() on the encapsulated enumeration.

Specified by:
hasNext in interface java.util.Iterator
Returns:
true if there is a next element in the enumeration.

next

public java.lang.Object next()
Returns the result of calling nextElement() on the encapsulated enumeration.

Specified by:
next in interface java.util.Iterator
Returns:
the next element in the enumeration.

remove

public void remove()
Can't be implemented: throws an InternalException.

Specified by:
remove in interface java.util.Iterator