public interface MutableList<E> extends BaseList<E>
BaseList
and
ImList
so that you can treat mutable and immutable lists the same.
You could think of this as a builder for an ImList, or just a stand-alone MutableList
that behaves similarly (extends Transformable
).
Being mutable, this is inherently NOT thread-safe.UnmodList.AbstractUnmodList<E>
UnmodIterable.AbstractUnmodIterable<T>
Modifier and Type | Method and Description |
---|---|
MutableList<E> |
append(E val)
Adds one item to the end of the ImList.
|
default MutableList<E> |
concat(Iterable<? extends E> es)
Efficiently adds items to the end of this ImList.
|
ImList<E> |
immutable()
Returns a immutable version of this mutable list.
|
MutableList<E> |
replace(int idx,
E e)
Replace the item at the given index.
|
default MutableList<E> |
reverse()
Returns a reversed copy of this list.
|
add, add, addAll, addAll, clear, contains, containsAll, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, permutations, remove, remove, removeAll, removeIf, replaceAll, retainAll, set, sort, subList, toArray, toArray
parallelStream, stream
castFromList, castFromSortedMap, castFromSortedSet, equal
drop, filter, flatMap, fold, foldUntil, hash, head, map, precat, take, takeWhile, toString
toImList, toImMap, toImSet, toImSortedMap, toImSortedSet, toMutableList, toMutableMap, toMutableSet, toMutableSortedMap, toMutableSortedSet
MutableList<E> append(E val)
default MutableList<E> concat(Iterable<? extends E> es)
concat
in interface BaseList<E>
concat
in interface Transformable<E>
concat
in interface UnmodIterable<E>
es
- the values to insertMutableList<E> replace(int idx, E e)
default MutableList<E> reverse()
Copyright © 2017. All rights reserved.