|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.util.Vector | +--java.util.Stack
A Last-In-First-Out(LIFO) stack of objects.
Field Summary |
Fields inherited from class java.util.Vector |
capacityIncrement, elementCount, elementData |
Constructor Summary | |
Stack()
|
Method Summary | |
boolean |
empty()
Returns true if the stack is empty. |
Object |
peek()
Peeks at the top of the stack. |
Object |
pop()
Pops an item off the stack. |
Object |
push(Object item)
Pushes an item onto the stack. |
int |
search(Object o)
Sees if an object is on the stack. |
Methods inherited from class java.util.Vector |
addElement, capacity, clone, 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, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public Stack()
Method Detail |
public Object push(Object item)
item
- the item to be pushed on.public Object pop()
EmptyStackException
- If the stack is empty.public Object peek()
EmptyStackException
- If the stack is empty.public boolean empty()
public int search(Object o)
o
- the desired object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |