Class SetEnumeration

java.lang.Object
  |
  +--SetEnumeration

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

This provides a way to enumerate over a set.


Constructor Summary
SetEnumeration(Set s)
          Creates a new SetEnumeration
 
Method Summary
 boolean hasMoreElements()
          Tests if this enumeration contains more elements.
 java.lang.Object nextElement()
          Returns the next element of this enumeration.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SetEnumeration

public SetEnumeration(Set s)
Creates a new SetEnumeration
Parameters:
list - The Set to enumerate over
Method Detail

hasMoreElements

public boolean hasMoreElements()
Tests if this enumeration contains more elements.
Specified by:
hasMoreElements in interface java.util.Enumeration
Returns:
true if this enumeration contains more elements; false otherwise.

nextElement

public java.lang.Object nextElement()
                             throws java.util.NoSuchElementException
Returns the next element of this enumeration. It throws a NoSuchElementException if no more elements exist.
Specified by:
nextElement in interface java.util.Enumeration
Returns:
the next element of this enumeration.