Class Stack<E>
java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractList<E>
java.util.ArrayList<E>
coneforest.psylla.runtime.Stack<E>
- Type Parameters:
E- a type of an element.
- All Implemented Interfaces:
Serializable, Cloneable, Iterable<E>, Collection<E>, List<E>, RandomAccess, SequencedCollection<E>
- Direct Known Subclasses:
DictStack, ExecutionStack, OperandStack, ProcStack
-
Constructor Summary
ConstructorsModifierConstructorDescription<E>Stack()Constructs an empty stack with an initial capacity of ten. -
Method Summary
Methods inherited from class ArrayList
add, add, addAll, addAll, addFirst, addLast, clear, clone, contains, ensureCapacity, equals, forEach, get, getFirst, getLast, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeFirst, removeIf, removeLast, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray, trimToSizeMethods inherited from class AbstractCollection
containsAll, toStringMethods inherited from interface Collection
parallelStream, stream, toArrayMethods inherited from interface List
containsAll, reversed
-
Constructor Details
-
Stack
public <E> Stack()Constructs an empty stack with an initial capacity of ten.- Type Parameters:
E- a type of an element.
-
-
Method Details
-
pop
-
peek
Returns the topmost of this stack without popping it.- Returns:
- the topmost of this stack without popping it
-
push
-
setSize
public void setSize(int size) Truncate this stack to the specified size.- Parameters:
size- the size.
-