public class PStack extends ArrayList
modCount
Constructor and Description |
---|
PStack()
Creates an empty stack.
|
Modifier and Type | Method and Description |
---|---|
Object |
peek()
Returns topmost element on the stack, or null if stack is empty.
|
Object |
pop()
Removes top element on the stack and returns it.
|
void |
push(Object o)
Pushes the provided object onto the top of the stack.
|
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, get, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeRange, retainAll, set, size, subList, toArray, toArray, trimToSize
equals, hashCode
containsAll, toString
finalize, getClass, notify, notifyAll, wait, wait, wait
containsAll, equals, hashCode
public void push(Object o)
o
- object to add to the stackpublic Object peek()
public Object pop()
Copyright © 1995-2013 Piccolo2D. All Rights Reserved.