E - the element typepublic abstract class ImmutableList<E>
extends java.util.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> |
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(E e) |
void |
add(int index,
E element) |
boolean |
addAll(int index,
java.util.Collection<? extends E> c) |
static <T> ImmutableList.Builder<T> |
builder()
Creates a new empty builder for building immutable lists.
|
void |
clear() |
static <T> org.jboss.weld.util.collections.ImmutableList.ImmutableListCollector<T> |
collector()
Returns a collector that can be used to collect items of a stream into an immutable list.
|
static <T> java.util.List<T> |
copyOf(java.util.Collection<T> source)
Creates an immutable list that consists of the elements in the given collection.
|
static <T> java.util.List<T> |
copyOf(java.lang.Iterable<T> source) |
static <T> java.util.List<T> |
copyOf(T[] elements)
Creates an immutable list that consists of the elements in the given array.
|
boolean |
isEmpty() |
java.util.Iterator<E> |
iterator() |
java.util.ListIterator<E> |
listIterator() |
static <T> java.util.List<T> |
of(T... elements)
Creates an immutable list that consists of the given elements.
|
E |
remove(int index) |
boolean |
removeIf(java.util.function.Predicate<? super E> filter) |
protected void |
removeRange(int fromIndex,
int toIndex) |
void |
replaceAll(java.util.function.UnaryOperator<E> operator) |
E |
set(int index,
E element) |
void |
sort(java.util.Comparator<? super E> c) |
java.util.Spliterator<E> |
spliterator() |
equals, get, hashCode, indexOf, lastIndexOf, listIterator, subListaddAll, contains, containsAll, remove, removeAll, retainAll, size, toArray, toArray, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, wait@SafeVarargs public static <T> java.util.List<T> of(T... elements)
copyOf(Object[]) should be used instead.elements - the given elementspublic static <T> java.util.List<T> copyOf(T[] elements)
elements - the given array of elementspublic static <T> java.util.List<T> copyOf(java.util.Collection<T> source)
source - the given collectionpublic static <T> java.util.List<T> copyOf(java.lang.Iterable<T> source)
public static <T> org.jboss.weld.util.collections.ImmutableList.ImmutableListCollector<T> collector()
public static <T> ImmutableList.Builder<T> builder()
public boolean add(E e)
public void add(int index,
E element)
public E remove(int index)
public void clear()
public boolean addAll(int index,
java.util.Collection<? extends E> c)
protected void removeRange(int fromIndex,
int toIndex)
removeRange in class java.util.AbstractList<E>public boolean isEmpty()
public void replaceAll(java.util.function.UnaryOperator<E> operator)
public void sort(java.util.Comparator<? super E> c)
public boolean removeIf(java.util.function.Predicate<? super E> filter)
public java.util.Iterator<E> iterator()
public java.util.ListIterator<E> listIterator()
public java.util.Spliterator<E> spliterator()
Copyright © 2015. All Rights Reserved.