public class FixedSizeStack extends Vector implements Serializable
Constructor and Description |
---|
FixedSizeStack(int size)
Creates a fixed size stack
|
Modifier and Type | Method and Description |
---|---|
Object |
pop()
Returns the last object that was pushed onto the stack
|
void |
push(Object O)
Pushes an object onto the stack.
|
add, add, addAll, addAll, addElement, capacity, clear, clone, contains, containsAll, copyInto, elementAt, elements, ensureCapacity, equals, firstElement, get, hashCode, indexOf, indexOf, insertElementAt, isEmpty, iterator, lastElement, lastIndexOf, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeAllElements, removeElement, removeElementAt, retainAll, set, setElementAt, setSize, size, subList, toArray, toArray, toString, trimToSize
public FixedSizeStack(int size)
size
- The size of this stackpublic void push(Object O)
O
- The object to be pushed onto the stackpublic Object pop()