|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This interface represents a LIFO stack. It provides basically two operations, pushing a new object onto the stack and "popping" the topmost object from the stack.
Method Summary | |
void |
clear()
|
boolean |
isEmpty()
|
java.lang.Object |
peek()
|
java.lang.Object |
peek(int n)
takes a "peek" at one of the elements on the stack, counting from the top. peek(0) is the same as peek(). |
java.lang.Object |
pop()
|
java.lang.Object |
pop(int n)
removes n items from the top of the stack and returns the last of them |
void |
push(java.lang.Object o)
|
int |
size()
|
Method Detail |
public void push(java.lang.Object o)
public java.lang.Object pop()
public java.lang.Object peek()
public boolean isEmpty()
public int size()
public void clear()
public java.lang.Object pop(int n)
public java.lang.Object peek(int n)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |