antlr.collections.impl
Class LLEnumeration
java.lang.Object
|
+--antlr.collections.impl.LLEnumeration
- All Implemented Interfaces:
- Enumeration
- final class LLEnumeration
- extends Object
- implements Enumeration
An enumeration of a LList. Maintains a cursor through the list.
bad things would happen if the list changed via another thread
while we were walking this list.
Method Summary |
boolean |
hasMoreElements()
Return true/false depending on whether there are more
elements to enumerate. |
Object |
nextElement()
Get the next element in the enumeration. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
cursor
LLCell cursor
list
LList list
LLEnumeration
public LLEnumeration(LList l)
- Create an enumeration attached to a LList
hasMoreElements
public boolean hasMoreElements()
- Return true/false depending on whether there are more
elements to enumerate.
- Specified by:
hasMoreElements
in interface Enumeration
- Returns:
true
if and only if this enumeration object
contains at least one more element to provide;
false
otherwise.
nextElement
public Object nextElement()
- Get the next element in the enumeration. Destructive in that
the returned element is removed from the enumeration. This
does not affect the list itself.
- Specified by:
nextElement
in interface Enumeration
- Returns:
- the next object in the enumeration.
comments?