Class LinkedListEnumeration

java.lang.Object
  |
  +--LinkedListEnumeration

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

This provides a way to enumerate over a linked list.


Constructor Summary
LinkedListEnumeration(LinkedList list)
          Creates a new LinkedListEnumeration
 
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

LinkedListEnumeration

public LinkedListEnumeration(LinkedList list)
Creates a new LinkedListEnumeration
Parameters:
list - The LinkedList 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.