org.pf.util
Class CollectionEnumeration<E>
java.lang.Object
org.pf.util.CollectionEnumeration<E>
- All Implemented Interfaces:
- java.util.Enumeration<E>
public class CollectionEnumeration<E>
- extends java.lang.Object
- implements java.util.Enumeration<E>
An enumeration object that can be used to iterate over all elements
of an underlying collection.
- Version:
- 1.0
- Author:
- Manfred Duchrow
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CollectionEnumeration
public CollectionEnumeration(java.util.Iterator<E> iter)
- Initialize the new instance with an iterator.
- Parameters:
iter - An iteration (must not be null)
CollectionEnumeration
public CollectionEnumeration(java.util.Collection<E> coll)
- Initialize the new instance with a collection.
- Parameters:
coll - A collection (must not be null)
hasMoreElements
public boolean hasMoreElements()
- Specified by:
hasMoreElements in interface java.util.Enumeration<E>
nextElement
public E nextElement()
- Specified by:
nextElement in interface java.util.Enumeration<E>