|
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--antlr.collections.impl.LList
Untamed: A Linked List Implementation (not thread-safe for simplicity) (adds to the tail) (has an enumeration)
| Field Summary | |
protected LLCell |
head
|
protected int |
length
|
protected LLCell |
tail
|
| Constructor Summary | |
LList()
Enabled: |
|
| Method Summary | |
void |
add(Object o)
Enabled: Add an object to the end of the list. |
void |
append(Object o)
Enabled: 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)
Enabled: Get the ith element in the list. |
Enumeration |
elements()
Enabled: Return an enumeration of the list elements |
int |
height()
Enabled: How high is the stack? |
boolean |
includes(Object o)
Enabled: 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()
Enabled: Return the length of the list. |
Object |
pop()
Enabled: Pop the top element of the stack off. |
void |
push(Object o)
Enabled: Push an object onto the stack. |
Object |
top()
Enabled: |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected LLCell head
protected LLCell tail
protected int length
| Constructor Detail |
public LList()
| Method Detail |
public void add(Object o)
add in interface Listo - the object to addpublic void append(Object o)
append in interface Listo - the object to append
protected Object deleteHead()
throws NoSuchElementException
NoSuchElementException
public Object elementAt(int i)
throws NoSuchElementException
elementAt in interface Listi - the index (from 0) of the requested element.
NoSuchElementExceptionpublic Enumeration elements()
elements in interface Listpublic int height()
height in interface Stackpublic boolean includes(Object o)
includes in interface Listo - the object to test for inclusion.
protected void insertHead(Object o)
o - the object to addpublic int length()
length in interface List
public Object pop()
throws NoSuchElementException
pop in interface StackNoSuchElementExceptionpublic void push(Object o)
push in interface Stacko - the object to push
public Object top()
throws NoSuchElementException
top in interface StackNoSuchElementException
|
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||