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 voidadd(java.lang.Object o)Add an object to the end of the list.voidappend(java.lang.Object o)Append an object to the end of the list.protected java.lang.ObjectdeleteHead()Delete the object at the head of the list.java.lang.ObjectelementAt(int i)Get the ith element in the list.java.util.Enumerationelements()Return an enumeration of the list elementsintheight()How high is the stack?booleanincludes(java.lang.Object o)Answers whether or not an object is contained in the listprotected voidinsertHead(java.lang.Object o)Insert an object at the head of the list.intlength()Return the length of the list.java.lang.Objectpop()Pop the top element of the stack off.voidpush(java.lang.Object o)Push an object onto the stack.java.lang.Objecttop()
-
-
-
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.NoSuchElementExceptionDelete 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.NoSuchElementExceptionGet 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.NoSuchElementExceptionPop the top element of the stack off.
-
push
public void push(java.lang.Object o)
Push an object onto the stack.
-
-