Public Member Functions | |
| void | add (Object o) |
| void | append (Object o) |
| Object | elementAt (int i) throws NoSuchElementException |
| Enumeration | elements () |
| int | height () |
| boolean | includes (Object o) |
| int | length () |
| Object | pop () throws NoSuchElementException |
| void | push (Object o) |
| Object | top () throws NoSuchElementException |
Protected Member Functions | |
| Object | deleteHead () throws NoSuchElementException |
| void | insertHead (Object o) |
Protected Attributes | |
| LLCell | head = null |
| LLCell | tail = null |
| int | length = 0 |
A Linked List Implementation (not thread-safe for simplicity) (adds to the tail) (has an enumeration)
| void antlr.collections.impl.LList.add | ( | Object | o | ) |
Add an object to the end of the list.
| o | the object to add |
References antlr.collections.impl.LList.append().
| void antlr.collections.impl.LList.append | ( | Object | o | ) |
Append an object to the end of the list.
| o | the object to append |
References antlr.collections.impl.LList.head, antlr.collections.impl.LList.length(), antlr.collections.impl.LLCell.next, and antlr.collections.impl.LList.tail.
Referenced by antlr.collections.impl.LList.add().
| Object antlr.collections.impl.LList.deleteHead | ( | ) | throws NoSuchElementException [protected] |
Delete the object at the head of the list.
| NoSuchElementException | if the list is empty. |
References antlr.collections.impl.LLCell.data, antlr.collections.impl.LList.head, antlr.collections.impl.LList.length(), and antlr.collections.impl.LLCell.next.
Referenced by antlr.collections.impl.LList.pop().
| Object antlr.collections.impl.LList.elementAt | ( | int | i | ) | throws NoSuchElementException |
Get the ith element in the list.
| i | the index (from 0) of the requested element. |
References antlr.collections.impl.LList.head, and antlr.collections.impl.LLCell.next.
| Enumeration antlr.collections.impl.LList.elements | ( | ) |
Return an enumeration of the list elements
| int antlr.collections.impl.LList.height | ( | ) |
How high is the stack?
Implements antlr.collections.Stack.
References antlr.collections.impl.LList.length.
| boolean antlr.collections.impl.LList.includes | ( | Object | o | ) |
Answers whether or not an object is contained in the list
| o | the object to test for inclusion. |
References antlr.collections.impl.LList.head, and antlr.collections.impl.LLCell.next.
| void antlr.collections.impl.LList.insertHead | ( | Object | o | ) | [protected] |
Insert an object at the head of the list.
| o | the object to add |
References antlr.collections.impl.LList.head, antlr.collections.impl.LList.length(), antlr.collections.impl.LLCell.next, and antlr.collections.impl.LList.tail.
Referenced by antlr.collections.impl.LList.push().
Return the length of the list.
References antlr.collections.impl.LList.length.
Referenced by antlr.collections.impl.LList.append(), antlr.collections.impl.LList.deleteHead(), and antlr.collections.impl.LList.insertHead().
| Object antlr.collections.impl.LList.pop | ( | ) | throws NoSuchElementException |
Pop the top element of the stack off.
| NoSuchElementException | if the stack is empty. |
Implements antlr.collections.Stack.
References antlr.collections.impl.LList.deleteHead().
| void antlr.collections.impl.LList.push | ( | Object | o | ) |
Push an object onto the stack.
| o | the object to push |
Implements antlr.collections.Stack.
References antlr.collections.impl.LList.insertHead().
| Object antlr.collections.impl.LList.top | ( | ) | throws NoSuchElementException |
Implements antlr.collections.Stack.
References antlr.collections.impl.LLCell.data, and antlr.collections.impl.LList.head.
LLCell antlr.collections.impl.LList.head = null [protected] |
Referenced by antlr.collections.impl.LList.append(), antlr.collections.impl.LList.deleteHead(), antlr.collections.impl.LList.elementAt(), antlr.collections.impl.LList.includes(), antlr.collections.impl.LList.insertHead(), antlr.collections.impl.LLEnumeration.LLEnumeration(), and antlr.collections.impl.LList.top().
int antlr.collections.impl.LList.length = 0 [protected] |
Referenced by antlr.collections.impl.LList.height(), and antlr.collections.impl.LList.length().
LLCell antlr.collections.impl.LList.tail = null [protected] |
Referenced by antlr.collections.impl.LList.append(), and antlr.collections.impl.LList.insertHead().
1.7.0