|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.ObjectStack<D>
D - The type of the data to store in the stack.public class Stack<D>
A list-based implementation of a stack (LIFO-buffer) with only constant time operations.
| Constructor Summary | |
|---|---|
Stack()
Creates an empty stack. |
|
| Method Summary | |
|---|---|
boolean |
isempty()
Checks whether this stack is empty. |
D |
pop()
Returns and removes the top-most element of this stack. |
void |
push(D x)
Pushes the given element x on the top of this stack. |
int |
size()
Returns the number of elements in this stack. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Stack()
| Method Detail |
|---|
public boolean isempty()
public D pop()
public void push(D x)
x - The element to store in this stack.public int size()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||