Package org.organicdesign.fp.collections
Class PersistentVector.MutVector<F>
- java.lang.Object
-
- org.organicdesign.fp.collections.AbstractUnmodIterable<E>
-
- org.organicdesign.fp.collections.UnmodList.AbstractUnmodList<F>
-
- org.organicdesign.fp.collections.PersistentVector.MutVector<F>
-
- All Implemented Interfaces:
Iterable<F>
,Collection<F>
,List<F>
,BaseList<F>
,MutList<F>
,Sized
,UnmodCollection<F>
,UnmodIterable<F>
,UnmodList<F>
,UnmodSortedCollection<F>
,UnmodSortedIterable<F>
,Transformable<F>
- Enclosing class:
- PersistentVector<E>
public static final class PersistentVector.MutVector<F> extends UnmodList.AbstractUnmodList<F> implements MutList<F>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.organicdesign.fp.collections.UnmodIterable
UnmodIterable.UnIterable
-
Nested classes/interfaces inherited from interface org.organicdesign.fp.collections.UnmodList
UnmodList.AbstractUnmodList<E>
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @NotNull MutList<F>
append(F val)
Adds one item to the end of the ImList.@NotNull MutList<F>
appendWhen(@NotNull Fn0<Boolean> test, F e)
Adds one item to the end of the ImList.F
get(int i)
PersistentVector<F>
immutable()
Returns a immutable version of this mutable list.@NotNull MutList<F>
replace(int idx, F e)
Replace the item at the given index.int
size()
Returns the number of items in this collection or iterable.-
Methods inherited from class org.organicdesign.fp.collections.UnmodList.AbstractUnmodList
equals, hashCode
-
Methods inherited from class org.organicdesign.fp.collections.AbstractUnmodIterable
toString
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Collection
parallelStream, stream, toArray
-
Methods inherited from interface java.util.List
equals, hashCode, spliterator
-
Methods inherited from interface org.organicdesign.fp.collections.MutList
add, addAll, concat, reverse
-
Methods inherited from interface org.organicdesign.fp.xform.Transformable
any, toImList, toImMap, toImRrbt, toImSet, toImSortedMap, toImSortedSet, toMutList, toMutMap, toMutRrbt, toMutSet, toMutSortedMap, toMutSortedSet
-
Methods inherited from interface org.organicdesign.fp.collections.UnmodIterable
drop, dropWhile, filter, flatMap, fold, foldUntil, map, precat, take, takeWhile, whereNonNull
-
Methods inherited from interface org.organicdesign.fp.collections.UnmodList
add, addAll, clear, contains, containsAll, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeIf, replaceAll, retainAll, set, sort, subList, toArray, toArray
-
-
-
-
Method Detail
-
size
public int size()
Description copied from interface:Sized
Returns the number of items in this collection or iterable.
-
immutable
public PersistentVector<F> immutable()
Description copied from interface:MutList
Returns a immutable version of this mutable list.
-
append
@NotNull public @NotNull MutList<F> append(F val)
Description copied from interface:MutList
Adds one item to the end of the ImList.
-
appendWhen
@NotNull public @NotNull MutList<F> appendWhen(@NotNull @NotNull Fn0<Boolean> test, F e)
Adds one item to the end of the ImList.- Specified by:
appendWhen
in interfaceBaseList<F>
- Specified by:
appendWhen
in interfaceMutList<F>
e
- the value to insert- Returns:
- a new ImList with the additional item at the end.
-
-