| Modifier and Type | Field and Description |
|---|---|
protected antlr.collections.impl.LLCell |
head |
protected int |
length |
protected antlr.collections.impl.LLCell |
tail |
| Constructor and Description |
|---|
LList() |
| Modifier and Type | Method and Description |
|---|---|
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() |
protected antlr.collections.impl.LLCell head
protected antlr.collections.impl.LLCell tail
protected int length
public void add(Object o)
public void append(Object o)
protected Object deleteHead() throws NoSuchElementException
NoSuchElementException - if the list is empty.public Object elementAt(int i) throws NoSuchElementException
elementAt in interface Listi - the index (from 0) of the requested element.NoSuchElementExceptionpublic Enumeration elements()
public boolean includes(Object o)
protected void insertHead(Object o)
o - the object to addpublic Object pop() throws NoSuchElementException
pop in interface StackNoSuchElementException - if the stack is empty.public void push(Object o)
public Object top() throws NoSuchElementException
top in interface StackNoSuchElementExceptionCopyright © 2017–2019 Eclipse Foundation. All rights reserved.