|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.AbstractCollection
java.util.AbstractList
java.util.Vector
maze.storage.PushPop
maze.storage.Stack
A PushPop that implements a LIFO Stack.
| Field Summary | |
protected java.util.Vector |
theStack
The Vector used to keep elements in the Stack. |
| Fields inherited from class java.util.Vector |
capacityIncrement, elementCount, elementData |
| Fields inherited from class java.util.AbstractList |
modCount |
| Constructor Summary | |
Stack()
Creates an empty Stack. |
|
Stack(int size)
Creates an empty Stack of the given size. |
|
Stack(int size,
int incr)
Creates an empty Stack with the giving sizing parameters. |
|
| Method Summary | |
boolean |
empty()
Returns true if the Stack is empty. |
java.lang.Object |
pop()
Pop an element from the top of the Stack. |
void |
push(java.lang.Object o)
Push a new element on the top of the Stack. |
| Methods inherited from class java.util.Vector |
add, add, addAll, addAll, addElement, capacity, clear, clone, contains, containsAll, copyInto, elementAt, elements, ensureCapacity, equals, firstElement, get, hashCode, indexOf, indexOf, insertElementAt, isEmpty, lastElement, lastIndexOf, lastIndexOf, remove, remove, removeAll, removeAllElements, removeElement, removeElementAt, removeRange, retainAll, set, setElementAt, setSize, size, subList, toArray, toArray, toString, trimToSize |
| Methods inherited from class java.util.AbstractList |
iterator, listIterator, listIterator |
| Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.util.List |
iterator, listIterator, listIterator |
| Field Detail |
protected java.util.Vector theStack
| Constructor Detail |
public Stack()
public Stack(int size)
size - int initial size.
public Stack(int size,
int incr)
size - int initial size.incr - the structure when the Stack is full.| Method Detail |
public boolean empty()
empty in class PushPoppublic void push(java.lang.Object o)
push in class PushPopo - Object to push on the top of the Stack.public java.lang.Object pop()
pop in class PushPop
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||