E - Element typepublic class ImmutableNullableList<E> extends AbstractList<E>
If the list cannot contain null values, use
ImmutableList.
| Modifier and Type | Class and Description |
|---|---|
static class |
ImmutableNullableList.Builder<E>
A builder for creating immutable nullable list instances.
|
modCount| Modifier and Type | Method and Description |
|---|---|
static <E> ImmutableNullableList.Builder<E> |
builder()
Returns a new builder.
|
static <E> List<E> |
copyOf(Collection<? extends E> elements)
Returns an immutable list containing the given elements, in order.
|
static <E> List<E> |
copyOf(E[] elements)
Returns an immutable list containing the given elements, in order.
|
E |
get(int index) |
static <E> List<E> |
of(E e1)
Creates an immutable list of 1 element.
|
static <E> List<E> |
of(E e1,
E e2)
Creates an immutable list of 2 elements.
|
static <E> List<E> |
of(E e1,
E e2,
E e3)
Creates an immutable list of 3 elements.
|
static <E> List<E> |
of(E e1,
E e2,
E e3,
E e4)
Creates an immutable list of 4 elements.
|
static <E> List<E> |
of(E e1,
E e2,
E e3,
E e4,
E e5)
Creates an immutable list of 5 elements.
|
static <E> List<E> |
of(E e1,
E e2,
E e3,
E e4,
E e5,
E e6)
Creates an immutable list of 6 elements.
|
static <E> List<E> |
of(E e1,
E e2,
E e3,
E e4,
E e5,
E e6,
E e7)
Creates an immutable list of 7 elements.
|
static <E> List<E> |
of(E e1,
E e2,
E e3,
E e4,
E e5,
E e6,
E e7,
E e8,
E... others)
Creates an immutable list of 8 or more elements.
|
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, toStringpublic static <E> List<E> copyOf(Collection<? extends E> elements)
Behavior as
ImmutableList.copyOf(java.util.Collection)
except that this list allows nulls.
public static <E> List<E> copyOf(E[] elements)
Behavior as
ImmutableList.copyOf(Object[])
except that this list allows nulls.
public static <E> List<E> of(E e1)
public static <E> List<E> of(E e1, E e2)
public static <E> List<E> of(E e1, E e2, E e3)
public static <E> List<E> of(E e1, E e2, E e3, E e4)
public static <E> List<E> of(E e1, E e2, E e3, E e4, E e5)
public static <E> List<E> of(E e1, E e2, E e3, E e4, E e5, E e6)
public static <E> List<E> of(E e1, E e2, E e3, E e4, E e5, E e6, E e7)
public static <E> List<E> of(E e1, E e2, E e3, E e4, E e5, E e6, E e7, E e8, E... others)
public E get(int index)
public int size()
size in interface Collection<E>size in interface List<E>size in class AbstractCollection<E>public static <E> ImmutableNullableList.Builder<E> builder()
ImmutableNullableList.Builder constructor.Copyright © 2012–2015 The Apache Software Foundation. All rights reserved.