public class FastStack<T> extends ArrayList<T>
modCount| Constructor and Description |
|---|
FastStack(int size)
Constructor for the FastStack
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
empty()
Check if the stack is empty
|
T |
peek()
Peek the object at the top of the stack,
if the stack is empty, @see java.util.EmptyStackException will be thrown.
|
T |
pop()
Remove an object from the top of the stack,
if the stack is empty, @see java.util.EmptyStackException will be thrown.
|
void |
push(T o)
Add an object to 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, trimToSizeequals, hashCodecontainsAll, toStringfinalize, getClass, notify, notifyAll, wait, wait, waitcontainsAll, equals, hashCodepublic FastStack(int size)
size - initial size of the stack to usepublic void push(T o)
o - object to be added to the stackpublic T pop()
public boolean empty()
public T peek()
Copyright © 2016. All rights reserved.