T
- @ParametersAreNonnullByDefault public final class SimpleStack<T> extends SimpleStackNullSupport<T>
Constructor and Description |
---|
SimpleStack() |
SimpleStack(int size) |
Modifier and Type | Method and Description |
---|---|
boolean |
contains(Object o)
can be overwritten to optimize.
|
int |
indexOf(Object o)
Not implemented, can be overwritten.
|
int |
lastIndexOf(Object o)
Not implemented, can be overwritten.
|
T |
peek()
take a look at the top of stack
returns null if there is no element.
|
T |
peekAndPush(T o) |
T |
pollLast() |
void |
pushNull()
pushes a null on top of stack.
|
boolean |
remove(Object o)
Can be overwritten for better implementation.
|
add, add, addAll, addAll, clear, containsAll, equals, get, getFromPtr, getPtr, hasElements, hashCode, isEmpty, iterator, listIterator, listIterator, peek, peekElemAfter, peekFromTop, peekUntil, pop, pop, popTo, popUntil, push, pushAll, pushAndGetIdx, remove, remove, removeAll, removeFromTop, replaceFromTop, retainAll, set, size, subList, toArray, toArray, toString, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
replaceAll, sort, spliterator
parallelStream, removeIf, stream
@Nullable public T peek()
peek
in class SimpleStackNullSupport<T>
public boolean remove(Object o)
SimpleStackNullSupport
remove
in interface Collection<T>
remove
in interface List<T>
remove
in class SimpleStackNullSupport<T>
o
- element to remove.public int indexOf(Object o)
public int lastIndexOf(Object o)
lastIndexOf
in interface List<T>
lastIndexOf
in class SimpleStackNullSupport<T>
public boolean contains(Object o)
SimpleStackNullSupport
contains
in interface Collection<T>
contains
in interface List<T>
contains
in class SimpleStackNullSupport<T>
public void pushNull()
SimpleStackNullSupport
pushNull
in class SimpleStackNullSupport<T>
Copyright © 2021 SPF4J. All rights reserved.