|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.util.Vector java.util.Stack
public class Stack
A LIFO stack of objects. TODO recycable
Field Summary |
---|
Fields inherited from class java.util.Vector |
---|
capacityIncrement, elementCount, elementData |
Constructor Summary | |
---|---|
Stack()
creates a new Stack instance |
Method Summary | |
---|---|
boolean |
empty()
is this stack empty? |
Object |
peek()
fetches an object from the stack does not remove it! |
Object |
pop()
fetches an object from the top of the stack and removes it |
Object |
push(Object anObject)
pushes an object onto the stack |
Methods inherited from class java.util.Vector |
---|
addElement, capacity, clear, elementAt, elements, ensureCapacity, equals, indexOf, indexOf, insertElementAt, isEmpty, lastIndexOf, lastIndexOf, removeAllElements, removeElement, removeElementAt, setElementAt, setSize, size, toArray, trimToSize |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Stack()
Method Detail |
---|
public Object push(Object anObject)
anObject
- the object
public Object pop() throws EmptyStackException
EmptyStackException
public Object peek() throws EmptyStackException
EmptyStackException
public boolean empty()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |