Package antlr.collections.impl
Class LLEnumeration
- java.lang.Object
-
- antlr.collections.impl.LLEnumeration
-
- All Implemented Interfaces:
java.util.Enumeration
final class LLEnumeration extends java.lang.Object implements java.util.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.
-
-
Constructor Summary
Constructors Constructor Description LLEnumeration(LList l)
Create an enumeration attached to a LList
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
hasMoreElements()
Return true/false depending on whether there are more elements to enumerate.java.lang.Object
nextElement()
Get the next element in the enumeration.
-
-
-
Constructor Detail
-
LLEnumeration
public LLEnumeration(LList l)
Create an enumeration attached to a LList
-
-
Method Detail
-
hasMoreElements
public boolean hasMoreElements()
Return true/false depending on whether there are more elements to enumerate.- Specified by:
hasMoreElements
in interfacejava.util.Enumeration
-
nextElement
public java.lang.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 interfacejava.util.Enumeration
- Returns:
- the next object in the enumeration.
-
-