public class PersistentVector<E> extends UnmodList.AbstractUnmodList<E> implements ImList<E>, Serializable
| Modifier and Type | Class and Description |
|---|---|
static class |
PersistentVector.MutableVector<F> |
UnmodList.AbstractUnmodList<E>UnmodIterable.AbstractUnmodIterable<T>| Modifier and Type | Field and Description |
|---|---|
static PersistentVector<?> |
EMPTY |
| Modifier and Type | Method and Description |
|---|---|
PersistentVector<E> |
append(E val)
Inserts a new item at the end of the Vecsicle.
|
PersistentVector<E> |
concat(Iterable<? extends E> items)
Efficiently adds items to the end of this PersistentVector.
|
static <T> PersistentVector<T> |
empty()
Returns the empty ImList (there only needs to be one)
|
static <T> PersistentVector.MutableVector<T> |
emptyMutable()
Returns a new mutable vector.
|
static <T> ImList<T> |
fromXform(Transformable<T> trans)
Deprecated.
|
E |
get(int i)
Returns the item specified by the given index.
|
ImList<E> |
immutable()
Returns a immutable version of this mutable list.
|
UnmodListIterator<E> |
listIterator(int index)
Subclasses should override this when they can do so more efficiently.
|
PersistentVector.MutableVector<E> |
mutable()
Returns a mutable list (builder)
|
static <T> PersistentVector<T> |
ofIter(Iterable<T> items)
Public static factory method to create a vector from an Iterable.
|
PersistentVector<E> |
replace(int i,
E val)
Replace the item at the given index.
|
int |
size()
Returns the number of items in this iterable.
|
equals, hashCodetoStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitadd, add, addAll, addAll, clear, contains, containsAll, indexOf, isEmpty, iterator, lastIndexOf, listIterator, permutations, remove, remove, removeAll, removeIf, replaceAll, retainAll, set, sort, subList, toArray, toArrayequals, hashCode, spliteratorparallelStream, streamcastFromList, castFromSortedMap, castFromSortedSet, equal, equalsdrop, filter, flatMap, foldLeft, foldLeft, hash, hashCode, head, map, precat, take, takeWhile, toStringtoImList, toImMap, toImSet, toImSortedMap, toImSortedSet, toMutableList, toMutableMap, toMutableSet, toMutableSortedMap, toMutableSortedSetpublic static final PersistentVector<?> EMPTY
@Deprecated public static <T> ImList<T> fromXform(Transformable<T> trans)
Transformable.toImList() instead.public static <T> PersistentVector<T> empty()
public static <T> PersistentVector.MutableVector<T> emptyMutable()
public static <T> PersistentVector<T> ofIter(Iterable<T> items)
StaticImports.vec(Object...).public PersistentVector.MutableVector<E> mutable()
ImListpublic ImList<E> immutable()
ImListpublic E get(int i)
public PersistentVector<E> replace(int i, E val)
public int size()
public PersistentVector<E> append(E val)
public PersistentVector<E> concat(Iterable<? extends E> items)
concat in interface ImList<E>concat in interface UnmodIterable<E>concat in interface Transformable<E>items - the values to insertpublic UnmodListIterator<E> listIterator(int index)
listIterator in interface List<E>listIterator in interface UnmodList<E>Copyright © 2017. All rights reserved.