pobs.action
Class PStack
java.lang.Object
java.util.AbstractCollection
pobs.action.PAbstractCollection
pobs.action.PAbstractList
pobs.action.PVector
pobs.action.PStack
- All Implemented Interfaces:
- java.util.Collection, java.util.List, PCollection, PList
- public class PStack
- extends PVector
Copies the methods of the Stack
class and implements
a number of POBS actions allowing the stack to be manipulated by a parser.
- Author:
- Martijn W. van der Lee
Method Summary |
boolean |
empty()
Tests if this stack is empty. |
java.lang.Object |
peek()
Looks at the object at the top of this stack without removing it from the
stack. |
java.lang.Object |
pop()
Removes the object at the top of this stack and returns that object as
the value of this function. |
PAction |
popAction()
|
java.lang.Object |
push(java.lang.Object item)
Pushes an item onto the top of this stack. |
PAction |
pushAction()
|
PAction |
pushAction(java.lang.Object o)
|
int |
search(java.lang.Object o)
Returns the 1-based position where an object is on this stack. |
Methods inherited from class pobs.action.PVector |
add, add, addAll, addAll, clear, contains, containsAll, get, getCollection, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, retainAll, set, size, subList, toArray, toArray |
Methods inherited from class java.util.AbstractCollection |
toString |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.List |
equals, hashCode |
PStack
public PStack()
popAction
public PAction popAction()
pushAction
public PAction pushAction()
pushAction
public PAction pushAction(java.lang.Object o)
empty
public boolean empty()
- Tests if this stack is empty.
peek
public java.lang.Object peek()
- Looks at the object at the top of this stack without removing it from the
stack.
pop
public java.lang.Object pop()
- Removes the object at the top of this stack and returns that object as
the value of this function.
push
public java.lang.Object push(java.lang.Object item)
- Pushes an item onto the top of this stack.
search
public int search(java.lang.Object o)
- Returns the 1-based position where an object is on this stack.