|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.Vector<E>
java.util.Stack<E>
public class Stack<E>
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? |
E |
peek()
fetches an object from the stack does not remove it! |
E |
pop()
fetches an object from the top of the stack and removes it |
E |
push(E anObject)
pushes an object onto the stack |
int |
search(Object o)
|
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, toArray, toString, trimToSize |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Stack()
Method Detail |
---|
public E push(E anObject)
anObject
- the object
public E pop()
EmptyStackException
public E peek()
EmptyStackException
public boolean empty()
public int search(Object o)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |