DCT Lightfoot v3 API specification

java.util
Class Stack

java.lang.Object
  |
  +--java.util.Vector
        |
        +--java.util.Stack

public class Stack
extends Vector

Implement a stack


Field Summary
 
Fields inherited from class java.util.Vector
capacityIncrement, elementCount, elementData
 
Constructor Summary
Stack()
           
 
Method Summary
 boolean empty()
          Test to see if this is empty
 Object peek()
          Peek the object at the top of the stack
 Object pop()
          Pop an object from the stack
 Object push(Object item)
          Push an object on to the stack
 int search(Object o)
          Search the stack for an object
 
Methods inherited from class java.util.Vector
addElement, capacity, contains, copyInto, elementAt, elements, ensureCapacity, firstElement, indexOf, indexOf, insertElementAt, isEmpty, lastElement, lastIndexOf, lastIndexOf, removeAllElements, removeElement, removeElementAt, setElementAt, setSize, size, toString, trimToSize
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Stack

public Stack()
Method Detail

push

public Object push(Object item)
Push an object on to the stack

Parameters:
item - The item to push
Returns:
the item pushed

pop

public Object pop()
Pop an object from the stack

Returns:
the item popped

peek

public Object peek()
Peek the object at the top of the stack

Returns:
the item peeked

empty

public boolean empty()
Test to see if this is empty

Returns:
true if it is empty

search

public int search(Object o)
Search the stack for an object

Returns:
the position on the stack or -1. The top of stack is 1

DCT Lightfoot v3 API specification

DCT Lightfoot v3 API specification