Package antlr.collections.impl
Class LList
- java.lang.Object
-
- antlr.collections.impl.LList
-
-
Constructor Summary
Constructors Constructor Description LList()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(java.lang.Object o)
Add an object to the end of the list.void
append(java.lang.Object o)
Append an object to the end of the list.protected java.lang.Object
deleteHead()
Delete the object at the head of the list.java.lang.Object
elementAt(int i)
Get the ith element in the list.java.util.Enumeration
elements()
Return an enumeration of the list elementsint
height()
How high is the stack?boolean
includes(java.lang.Object o)
Answers whether or not an object is contained in the listprotected void
insertHead(java.lang.Object o)
Insert an object at the head of the list.int
length()
Return the length of the list.java.lang.Object
pop()
Pop the top element of the stack off.void
push(java.lang.Object o)
Push an object onto the stack.java.lang.Object
top()
-
-
-
Method Detail
-
add
public void add(java.lang.Object o)
Add an object to the end of the list.
-
append
public void append(java.lang.Object o)
Append an object to the end of the list.
-
deleteHead
protected java.lang.Object deleteHead() throws java.util.NoSuchElementException
Delete the object at the head of the list.- Returns:
- the object found at the head of the list.
- Throws:
java.util.NoSuchElementException
- if the list is empty.
-
elementAt
public java.lang.Object elementAt(int i) throws java.util.NoSuchElementException
Get the ith element in the list.
-
elements
public java.util.Enumeration elements()
Return an enumeration of the list elements
-
includes
public boolean includes(java.lang.Object o)
Answers whether or not an object is contained in the list
-
insertHead
protected void insertHead(java.lang.Object o)
Insert an object at the head of the list.- Parameters:
o
- the object to add
-
pop
public java.lang.Object pop() throws java.util.NoSuchElementException
Pop the top element of the stack off.
-
push
public void push(java.lang.Object o)
Push an object onto the stack.
-
-