|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectewe.util.Stack
| Constructor Summary | |
Stack()
This constructor creates a new Stack, initially empty |
|
| Method Summary | |
void |
clear()
|
Object |
elementAt(int index)
|
boolean |
empty()
Tests if the stack is empty. |
Object |
peek()
Returns the top Object on the stack without removing it. |
Object |
pop()
Pops an item from the stack and returns it. |
Object |
push(Object item)
Pushes an Object onto the top of the stack. |
int |
search(Object o)
Returns the position of an Object on the stack, with the top most Object being at position 1, and each Object deeper in the stack at depth + 1. |
int |
size()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, toString |
| Constructor Detail |
public Stack()
| Method Detail |
public void clear()
public Object push(Object item)
item - the Object to push onto the stack
public Object pop()
EmptyStackException - if the stack is emptypublic Object peek()
EmptyStackException - if the stack is emptypublic boolean empty()
public int search(Object o)
o - The object to search for
public int size()
public Object elementAt(int index)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||