antlr.collections.impl
public class LList extends Object implements List, Stack
| Field Summary | |
|---|---|
| protected LLCell | head |
| protected int | length |
| protected LLCell | tail |
| Method Summary | |
|---|---|
| void | add(Object o) Add an object to the end of the list. |
| void | append(Object o) Append an object to the end of the list. |
| protected Object | deleteHead() Delete the object at the head of the list. |
| Object | elementAt(int i) Get the ith element in the list. |
| Enumeration | elements() Return an enumeration of the list elements |
| int | height() How high is the stack? |
| boolean | includes(Object o) Answers whether or not an object is contained in the list |
| protected void | insertHead(Object o) Insert an object at the head of the list. |
| int | length() Return the length of the list. |
| Object | pop() Pop the top element of the stack off. |
| void | push(Object o) Push an object onto the stack. |
| Object | top() |
Parameters: o the object to add
Parameters: o the object to append
Returns: the object found at the head of the list.
Throws: NoSuchElementException if the list is empty.
Parameters: i the index (from 0) of the requested element.
Returns: the object at index i NoSuchElementException is thrown if i out of range
Parameters: o the object to test for inclusion.
Returns: true if object is contained else false.
Parameters: o the object to add
Returns: the top of stack that was popped off.
Throws: NoSuchElementException if the stack is empty.
Parameters: o the object to push