E - the element typepublic abstract class ImmutableList<E> extends AbstractList<E>
List implementations. Based on the size of the data, methods of this class may return List instances using various storage
strategies in order to achieve the best performance / memory consumption balance.WELD-1753| Modifier and Type | Class and Description |
|---|---|
static interface |
ImmutableList.Builder<T> |
modCount| Modifier and Type | Method and Description |
|---|---|
boolean |
add(E e) |
void |
add(int index,
E element) |
boolean |
addAll(int index,
Collection<? extends E> c) |
static <T> ImmutableList.Builder<T> |
builder()
Creates a new empty builder for building immutable lists.
|
void |
clear() |
static <T> List<T> |
copyOf(Collection<T> source)
Creates an immutable list that consists of the elements in the given collection.
|
static <T> List<T> |
copyOf(Iterable<T> source) |
static <T> List<T> |
copyOf(T[] elements)
Creates an immutable list that consists of the elements in the given array.
|
protected IndexOutOfBoundsException |
indexOutOfBoundsException(int index) |
boolean |
isEmpty() |
Iterator<E> |
iterator() |
ListIterator<E> |
listIterator() |
static <T> List<T> |
of(T... elements)
Creates an immutable list that consists of the given elements.
|
E |
remove(int index) |
protected void |
removeRange(int fromIndex,
int toIndex) |
E |
set(int index,
E element) |
equals, get, hashCode, indexOf, lastIndexOf, listIterator, subListaddAll, contains, containsAll, remove, removeAll, retainAll, size, toArray, toArray, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitaddAll, contains, containsAll, remove, removeAll, replaceAll, retainAll, size, sort, spliterator, toArray, toArrayparallelStream, removeIf, stream@SafeVarargs public static <T> List<T> of(T... elements)
copyOf(Object[]) should be used instead.elements - the given elementspublic static <T> List<T> copyOf(T[] elements)
elements - the given array of elementspublic static <T> List<T> copyOf(Collection<T> source)
source - the given collectionpublic static <T> ImmutableList.Builder<T> builder()
public boolean add(E e)
add in interface Collection<E>add in interface List<E>add in class AbstractList<E>public void add(int index,
E element)
public E remove(int index)
public void clear()
clear in interface Collection<E>clear in interface List<E>clear in class AbstractList<E>public boolean addAll(int index,
Collection<? extends E> c)
protected void removeRange(int fromIndex,
int toIndex)
removeRange in class AbstractList<E>public boolean isEmpty()
isEmpty in interface Collection<E>isEmpty in interface List<E>isEmpty in class AbstractCollection<E>public ListIterator<E> listIterator()
listIterator in interface List<E>listIterator in class AbstractList<E>protected IndexOutOfBoundsException indexOutOfBoundsException(int index)
Copyright © 2017. All rights reserved.