pobs.action
Class PStack

java.lang.Object
  extended byjava.util.AbstractCollection
      extended bypobs.action.PAbstractCollection
          extended bypobs.action.PAbstractList
              extended bypobs.action.PVector
                  extended bypobs.action.PStack
All Implemented Interfaces:
java.util.Collection, java.util.List, PCollection, PList

public class PStack
extends PVector

Copies the methods of the Stackclass and implements a number of POBS actions allowing the stack to be manipulated by a parser.

Author:
Martijn W. van der Lee

Constructor Summary
PStack()
           
 
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 pobs.action.PAbstractList
addAction, addAction, addAction, addAction, addAllAction, addAllAction, removeAction, removeAction, setAction, setAction
 
Methods inherited from class pobs.action.PAbstractCollection
addAction, addAction, addAllAction, clearAction, removeAction, removeAction, removeAllAction, retainAllAction
 
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
 
Methods inherited from interface pobs.action.PCollection
addAction, addAction, addAllAction, clearAction, removeAction, removeAction, removeAllAction, retainAllAction
 

Constructor Detail

PStack

public PStack()
Method Detail

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.