|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--UnboundedStack
This class implements interface StackImpl with a stack represented by a linked list.
Inner Class Summary | |
private class |
UnboundedStack.Node
|
Field Summary | |
private int |
count
|
private UnboundedStack.Node |
data
|
Constructor Summary | |
UnboundedStack()
|
Method Summary | |
int |
pop()
Pop the stack. |
void |
push(int val)
Push an integer onto the stack. |
int |
size()
Return the number of elements contained in the stack. |
Methods inherited from class java.lang.Object |
|
Field Detail |
private UnboundedStack.Node data
private int count
Constructor Detail |
public UnboundedStack()
Method Detail |
public void push(int val)
val
- The integer value pushed onto the stack.public int pop()
public int size()
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |