javatools.util
Class IteratorToEnumeration

java.lang.Object
  |
  +--javatools.util.IteratorToEnumeration
All Implemented Interfaces:
java.util.Enumeration

public class IteratorToEnumeration
extends java.lang.Object
implements java.util.Enumeration

Uses an Iterator object as an Enumeration object.


Constructor Summary
IteratorToEnumeration(java.util.Iterator it)
          Creates a new object.
 
Method Summary
 boolean hasMoreElements()
          Checks if there are more elements in this iterator.
 java.lang.Object nextElement()
          Returns the next element of the iterator.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IteratorToEnumeration

public IteratorToEnumeration(java.util.Iterator it)
Creates a new object.

Parameters:
it - The iterator to use.
Method Detail

hasMoreElements

public boolean hasMoreElements()
Checks if there are more elements in this iterator.

Specified by:
hasMoreElements in interface java.util.Enumeration
Returns:
true: yes, there are; false: no, there aren't.

nextElement

public java.lang.Object nextElement()
Returns the next element of the iterator.

Specified by:
nextElement in interface java.util.Enumeration
Returns:
The next element.