| Modifier and Type | Field and Description |
|---|---|
(package private) static FStack<java.lang.Object> |
EMPTY
Empty stack.
|
| Constructor and Description |
|---|
FStackImpl(T element,
FStack<T> tail)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
isEmpty()
Is this stack empty?
|
FStack<T> |
pop()
Pop the stack.
|
FStack<T> |
push(T elem)
Push an element to the top of the stack.
|
int |
size()
Get the size of this stack.
|
T |
top()
Get the top element of the stack.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitempty, empty, emptyCopyable, from, from, fromCopyable, iterator, pushAll, reverseFrom, reverseFrom, reverseFromCopyable, reversePushAllstatic FStack<java.lang.Object> EMPTY
FStack.empty() instead.@NotNull public FStack<T> push(T elem)
FStackFStack.top().@NotNull public FStack<T> pop()
FStackpublic boolean isEmpty()
FStackFStack.top() and FStack.pop() are not allowed and
will result in EmptyStackExceptions