- Type Parameters:
E-
- All Superinterfaces:
Collection<E>,Iterable<E>,List<E>,PCollection<E>
- All Known Implementing Classes:
ConsPStack,TreePVector
An immutable, persistent indexed collection.
-
Method Summary
Modifier and TypeMethodDescriptionvoidDeprecated.booleanaddAll(int index, Collection<? extends E> c) Deprecated.minus(int i) Returns a sequence consisting of the elements of this without the first occurrence of e.minusAll(Collection<?> list) plusAll(int i, Collection<? extends E> list) plusAll(Collection<? extends E> list) remove(int index) Deprecated.Deprecated.subList(int start, int end) Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArrayMethods 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
- Specified by:
plusin interfacePCollection<E>- Returns:
- a collection which contains e and all of the elements of this
-
plusAll
- Specified by:
plusAllin interfacePCollection<E>- Returns:
- a collection which contains all of the elements of list and this
-
with
- Parameters:
i-e-- Returns:
- a sequence consisting of the elements of this with e replacing the element at index i.
- Throws:
IndexOutOfBOundsException- if i<0 || i>=this.size()
-
plus
- Parameters:
i-e-- Returns:
- a sequence consisting of the elements of this with e inserted at index i.
- Throws:
IndexOutOfBOundsException- if i<0 || i>this.size()
-
plusAll
- Parameters:
i-list-- Returns:
- a sequence consisting of the elements of this with list inserted at index i.
- Throws:
IndexOutOfBOundsException- if i<0 || i>this.size()
-
minus
Returns a sequence consisting of the elements of this without the first occurrence of e.- Specified by:
minusin interfacePCollection<E>- Returns:
- this with a single instance of e removed, if e is in this
-
minusAll
- Specified by:
minusAllin interfacePCollection<E>- Returns:
- this with all elements of list completely removed
-
minus
- Parameters:
i-- Returns:
- a sequence consisting of the elements of this with the element at index i removed.
- Throws:
IndexOutOfBOundsException- if i<0 || i>=this.size()
-
subList
-
addAll
Deprecated. -
set
Deprecated. -
add
Deprecated. -
remove
Deprecated.
-