|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface StackADT<T>
Method Summary | |
---|---|
int |
getSize()
Returns the number of objects on the stack. |
boolean |
isEmpty()
Tests if this stack is empty. |
boolean |
isFull()
Tests if this stack is full. |
T |
peek()
Returns the object at the top of this stack without removing it. |
T |
pop()
Removes and returns the object at the top of this stack. |
void |
push(T x)
Pushes an object onto the top of this stack. |
Method Detail |
---|
void push(T x)
x
- The object to be stored onto the stack.
StackFullException
- - if this stack is fullT pop()
StackEmptyException
- - if this stack is fullT peek()
StackEmptyException
- - if this stack is fullboolean isEmpty()
boolean isFull()
int getSize()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |