- Type Parameters:
E
-
- All Superinterfaces:
Collection<E>
,Iterable<E>
,List<E>
,PCollection<E>
,PSequence<E>
- All Known Implementing Classes:
ConsPStack
An immutable, persistent stack.
-
Method Summary
Modifier and TypeMethodDescriptionminus
(int i) Returns a sequence consisting of the elements of this without the first occurrence of e.minusAll
(Collection<?> list) Returns a stack consisting of the elements of this with e prepended.plusAll
(int i, Collection<? extends E> list) plusAll
(Collection<? extends E> list) Returns a stack consisting of the elements of this with list prepended in reverse.subList
(int start) subList
(int start, int end) Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
Methods inherited from interface java.util.List
add, addAll, clear, contains, containsAll, equals, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, removeAll, replaceAll, retainAll, size, sort, spliterator, toArray, toArray
-
Method Details
-
plus
Returns a stack consisting of the elements of this with e prepended. -
plusAll
Returns a stack consisting of the elements of this with list prepended in reverse. -
with
-
plus
-
plusAll
-
minus
Description copied from interface:PSequence
Returns a sequence consisting of the elements of this without the first occurrence of e. -
minusAll
-
minus
-
subList
-
subList
- Parameters:
start
-- Returns:
- subList(start,this.size())
-