public class NullAllowingImmutableList<E> extends AbstractList<E> implements Serializable
| Modifier and Type | Class and Description |
|---|---|
static class |
NullAllowingImmutableList.Builder<E>
A builder to create an immutable list; this class is not thread-safe.
|
modCount| Modifier and Type | Method and Description |
|---|---|
static <E> NullAllowingImmutableList.Builder<E> |
builder()
Returns a builder to create a new instance, with the default expected size (16).
|
static <E> NullAllowingImmutableList.Builder<E> |
builder(int expectedSize)
Returns a builder to create a new instance.
|
static <E> NullAllowingImmutableList<E> |
copyOf(Iterable<E> iterable) |
E |
get(int index) |
static <E> NullAllowingImmutableList<E> |
of() |
static <E> NullAllowingImmutableList<E> |
of(E... elements) |
static <E> NullAllowingImmutableList<E> |
of(E element) |
static <E> NullAllowingImmutableList<E> |
of(E element1,
E element2) |
static <E> NullAllowingImmutableList<E> |
of(E element1,
E element2,
E element3) |
int |
size() |
add, add, addAll, clear, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, remove, removeRange, set, subListaddAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitaddAll, contains, containsAll, isEmpty, remove, removeAll, replaceAll, retainAll, sort, spliterator, toArray, toArrayparallelStream, removeIf, stream@SafeVarargs public static <E> NullAllowingImmutableList<E> of(E... elements)
public static <E> NullAllowingImmutableList<E> of()
public static <E> NullAllowingImmutableList<E> of(E element)
public static <E> NullAllowingImmutableList<E> of(E element1, E element2)
public static <E> NullAllowingImmutableList<E> of(E element1, E element2, E element3)
public static <E> NullAllowingImmutableList<E> copyOf(Iterable<E> iterable)
public static <E> NullAllowingImmutableList.Builder<E> builder()
builder(int)public static <E> NullAllowingImmutableList.Builder<E> builder(int expectedSize)
expectedSize - the number of expected elements in the list. This is used to pre-size
internal data structures (if the builder ends up having more elements, it resizes
automatically).public E get(int index)
public int size()
size in interface Collection<E>size in interface List<E>size in class AbstractCollection<E>Copyright © 2017–2020. All rights reserved.