|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectweiss.util.Stack<AnyType>
public class Stack<AnyType>
Stack class. Unlike java.util.Stack, this is not extended from Vector. This is the minimum respectable set of operations.
| Constructor Summary | |
|---|---|
Stack()
Constructs an empty stack. |
|
| Method Summary | |
|---|---|
void |
clear()
|
boolean |
isEmpty()
Tests if stack is empty. |
AnyType |
peek()
Returns item from the top of the stack. |
AnyType |
pop()
Removes and returns item from the top of the stack. |
AnyType |
push(AnyType x)
Adds an item to the top of the stack. |
int |
size()
Returns the size of the stack. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Stack()
| Method Detail |
|---|
public AnyType push(AnyType x)
x - the item to add.
public AnyType pop()
EmptyStackException - if stack is empty.public AnyType peek()
EmptyStackException - if stack is empty.public boolean isEmpty()
public int size()
public void clear()
public java.lang.String toString()
toString in class java.lang.Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||