E - public final class ConsPStack<E> extends AbstractSequentialList<E> implements PStack<E>, Serializable
This implementation is thread-safe (assuming Java's AbstractSequentialList is thread-safe), although its iterators may not be.
modCount| Modifier and Type | Method and Description |
|---|---|
static <E> ConsPStack<E> |
empty() |
static <E> ConsPStack<E> |
from(Collection<? extends E> list) |
ListIterator<E> |
listIterator(int index) |
ConsPStack<E> |
minus(int i) |
ConsPStack<E> |
minus(Object e)
Returns a sequence consisting of the elements of this without the first occurrence of e.
|
ConsPStack<E> |
minusAll(Collection<?> list) |
ConsPStack<E> |
plus(E e)
Returns a stack consisting of the elements of this with e prepended.
|
ConsPStack<E> |
plus(int i,
E e) |
ConsPStack<E> |
plusAll(Collection<? extends E> list)
Returns a stack consisting of the elements of this with list prepended in reverse.
|
ConsPStack<E> |
plusAll(int i,
Collection<? extends E> list) |
static <E> ConsPStack<E> |
singleton(E e) |
int |
size() |
ConsPStack<E> |
subList(int start) |
ConsPStack<E> |
subList(int start,
int end) |
ConsPStack<E> |
with(int i,
E e) |
add, addAll, get, iterator, remove, setadd, clear, equals, hashCode, indexOf, lastIndexOf, listIterator, removeRangeaddAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitadd, addAll, clear, remove, removeAll, retainAlladd, addAll, clear, contains, containsAll, equals, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, remove, removeAll, replaceAll, retainAll, sort, spliterator, toArray, toArrayparallelStream, removeIf, streampublic static <E> ConsPStack<E> empty()
E - public static <E> ConsPStack<E> singleton(E e)
E - e - public static <E> ConsPStack<E> from(Collection<? extends E> list)
E - list - public int size()
size in interface Collection<E>size in interface List<E>size in class AbstractCollection<E>public ListIterator<E> listIterator(int index)
listIterator in interface List<E>listIterator in class AbstractSequentialList<E>public ConsPStack<E> subList(int start, int end)
public ConsPStack<E> plus(E e)
PStackpublic ConsPStack<E> plusAll(Collection<? extends E> list)
PStackpublic ConsPStack<E> plus(int i, E e)
public ConsPStack<E> plusAll(int i, Collection<? extends E> list)
public ConsPStack<E> minus(Object e)
PSequencepublic ConsPStack<E> minus(int i)
public ConsPStack<E> minusAll(Collection<?> list)
public ConsPStack<E> with(int i, E e)
public ConsPStack<E> subList(int start)
Copyright © 2019. All rights reserved.