Package org.organicdesign.fp.collections
Class PersistentVector.MutableVector<F>
- java.lang.Object
-
- org.organicdesign.fp.collections.AbstractUnmodIterable<E>
-
- org.organicdesign.fp.collections.UnmodList.AbstractUnmodList<F>
-
- org.organicdesign.fp.collections.PersistentVector.MutableVector<F>
-
- All Implemented Interfaces:
java.lang.Iterable<F>,java.util.Collection<F>,java.util.List<F>,BaseList<F>,MutableList<F>,Sized,UnmodCollection<F>,UnmodIterable<F>,UnmodList<F>,UnmodSortedCollection<F>,UnmodSortedIterable<F>,Transformable<F>
- Enclosing class:
- PersistentVector<E>
public static final class PersistentVector.MutableVector<F> extends UnmodList.AbstractUnmodList<F> implements MutableList<F>
-
-
Nested Class Summary
-
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 MutableList<F>append(F val)Adds one item to the end of the ImList.Fget(int i)PersistentVector<F>immutable()Returns a immutable version of this mutable list.MutableList<F>replace(int idx, F e)Replace the item at the given index.intsize()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 org.organicdesign.fp.collections.MutableList
concat, reverse
-
Methods inherited from interface org.organicdesign.fp.xform.Transformable
toImList, toImMap, toImRrbt, toImSet, toImSortedMap, toImSortedSet, toMutableList, toMutableMap, toMutableRrbt, toMutableSet, toMutableSortedMap, toMutableSortedSet
-
Methods inherited from interface org.organicdesign.fp.collections.UnmodIterable
drop, dropWhile, filter, flatMap, fold, foldUntil, map, precat, take, takeWhile
-
Methods inherited from interface org.organicdesign.fp.collections.UnmodList
add, add, addAll, 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:SizedReturns the number of items in this collection or iterable.
-
immutable
public PersistentVector<F> immutable()
Description copied from interface:MutableListReturns a immutable version of this mutable list.- Specified by:
immutablein interfaceMutableList<F>
-
append
public MutableList<F> append(F val)
Description copied from interface:MutableListAdds one item to the end of the ImList.
-
replace
public MutableList<F> replace(int idx, F e)
Description copied from interface:MutableListReplace the item at the given index. Note: i.replace(i.size(), o) used to be equivalent to i.concat(o), but it probably won't be for the RRB tree implementation, so this will change too.
-
-