|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectdtypes.PSStack
The Stack ADT definition. Every newly created object has specific bevarious declared. This ADT offers all the functions needed to create and operate PSStack.
| Field Summary | |
protected int |
numberElem
|
protected java.util.Vector |
v
|
| Constructor Summary | |
PSStack()
Creates a new PSStack. |
|
| Method Summary | |
void |
clear()
Removes all elements from stack. |
java.lang.Object |
get(int n)
|
int |
getSize()
Returns the size of the stack. |
boolean |
isEmpty()
Checks whether the stack is empty. |
java.lang.Class |
peek(int n)
Retrieves the type of peek Precondition : Postcondition : The size of the stack is returned. |
java.lang.Object |
pop()
Returns the size of the stack. |
void |
push(java.lang.Object element)
Pushes an element on top of the stack. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected java.util.Vector v
protected int numberElem
| Constructor Detail |
public PSStack()
| Method Detail |
public void push(java.lang.Object element)
element - The element to be pushed.public void clear()
public boolean isEmpty()
public int getSize()
public java.lang.Object pop()
public java.lang.Class peek(int n)
public java.lang.Object get(int n)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||