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, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitreplaceAll, sort, spliteratorparallelStream, removeIf, stream@Nullable public T peek()
peek in class SimpleStackNullSupport<T>public boolean remove(Object o)
SimpleStackNullSupportremove 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)
SimpleStackNullSupportcontains in interface Collection<T>contains in interface List<T>contains in class SimpleStackNullSupport<T>public void pushNull()
SimpleStackNullSupportpushNull in class SimpleStackNullSupport<T>Copyright © 2021 SPF4J. All rights reserved.