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, wait
empty, empty, emptyCopyable, from, from, fromCopyable, iterator, pushAll, reverseFrom, reverseFrom, reverseFromCopyable, reversePushAll
static FStack<java.lang.Object> EMPTY
FStack.empty()
instead.@NotNull public FStack<T> push(T elem)
FStack
FStack.top()
.@NotNull public FStack<T> pop()
FStack
public boolean isEmpty()
FStack
FStack.top()
and FStack.pop()
are not allowed and
will result in EmptyStackException
s