T - The elements of the stackpublic class FastStack<T> extends ArrayList<T>
modCount| Constructor and Description |
|---|
FastStack()
Creates a new stack
|
FastStack(int initialSize)
Creates a new stack with the given initial size
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
empty()
Returns true if and only if the stack is empty
|
T |
peek()
Returns the last item on the stack or throws an exception of there is none.
|
T |
pop()
Returns and removes the last item from the stack.
|
void |
push(T t)
Pushes an item onto the stack
|
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, forEach, get, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeIf, removeRange, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray, trimToSizeequals, hashCodecontainsAll, toStringfinalize, getClass, notify, notifyAll, wait, wait, waitcontainsAll, equals, hashCodeparallelStream, streampublic FastStack()
public FastStack(int initialSize)
initialSize - the initial sizepublic T peek()
public void push(T t)
t - the itempublic T pop()
public boolean empty()
Copyright © 2024 Soot OSS. All rights reserved.