@Immutable public interface ImmutableList<E> extends java.util.List<E>, java.util.RandomAccess
Modifier and Type | Interface and Description |
---|---|
static class |
ImmutableList.Builder<E> |
static interface |
ImmutableList.ImmutableListIterator<E> |
Modifier and Type | Method and Description |
---|---|
default boolean |
add(E e)
Deprecated.
|
default void |
add(int index,
E element)
Deprecated.
|
default boolean |
addAll(@NotNull java.util.Collection<? extends E> c)
Deprecated.
|
default boolean |
addAll(int index,
@NotNull java.util.Collection<? extends E> c)
Deprecated.
|
static <E> @NotNull ImmutableList.Builder<E> |
builder() |
static <E> @NotNull ImmutableList.Builder<E> |
builder(int capacity) |
default void |
clear()
Deprecated.
|
default boolean |
contains(@Nullable java.lang.Object o) |
default boolean |
containsAll(@NotNull java.util.Collection<?> c) |
static <E> @NotNull ImmutableList<E> |
copyOf(@Nullable java.util.Collection<? extends E> elements) |
static <E> @NotNull ImmutableList<E> |
copyOf(@Nullable java.util.Collection<? extends E> elements,
@NotNull java.lang.String name) |
static <E> @NotNull ImmutableList<E> |
copyOf(E[] elements) |
static <E> @NotNull ImmutableList<E> |
copyOf(E[] elements,
@NotNull java.lang.String name) |
E |
get(int index) |
default boolean |
isEmpty() |
default @NotNull ImmutableList.ImmutableListIterator<E> |
iterator() |
default @NotNull ImmutableList.ImmutableListIterator<E> |
listIterator() |
@NotNull ImmutableList.ImmutableListIterator<E> |
listIterator(int index) |
static <E> @NotNull ImmutableList<E> |
of() |
static <E> @NotNull ImmutableList<E> |
of(E e) |
static <E> @NotNull ImmutableList<E> |
of(E e1,
E e2) |
static <E> @NotNull ImmutableList<E> |
of(E e1,
E e2,
E e3) |
static <E> @NotNull ImmutableList<E> |
of(E e1,
E e2,
E e3,
E... others) |
default E |
remove(int index)
Deprecated.
|
default boolean |
remove(@Nullable java.lang.Object o)
Deprecated.
|
default boolean |
removeAll(@NotNull java.util.Collection<?> c)
Deprecated.
|
default boolean |
removeIf(@NotNull java.util.function.Predicate<? super E> filter)
Deprecated.
|
default void |
replaceAll(@NotNull java.util.function.UnaryOperator<E> operator)
Deprecated.
|
default boolean |
retainAll(@NotNull java.util.Collection<?> c)
Deprecated.
|
default E |
set(int index,
E element)
Deprecated.
|
default void |
sort(java.util.Comparator<? super E> c)
Deprecated.
|
@NotNull ImmutableList<E> |
subList(int fromIndex,
int toIndex) |
default @NotNull ImmutableList<E> |
trim() |
@NotNull static <E> @NotNull ImmutableList<E> of()
@Contract(value="null -> fail") @NotNull static <E> @NotNull ImmutableList<E> of(@Nullable E e)
@Contract(value="null, _ -> fail; _, null -> fail") @NotNull static <E> @NotNull ImmutableList<E> of(@Nullable E e1, @Nullable E e2)
@Contract(value="null, _, _ -> fail; _, null, _ -> fail; _, _, null -> fail") @NotNull static <E> @NotNull ImmutableList<E> of(@Nullable E e1, @Nullable E e2, @Nullable E e3)
@SafeVarargs @Contract(value="null, _, _, _ -> fail; _, null, _, _ -> fail; _, _, null, _ -> fail; _, _, _, null -> fail") @NotNull static <E> @NotNull ImmutableList<E> of(@Nullable E e1, @Nullable E e2, @Nullable E e3, @Nullable E... others)
@Contract(value="null -> fail") @NotNull static <E> @NotNull ImmutableList<E> copyOf(@Nullable E[] elements)
@Contract(value="null, _ -> fail") @NotNull static <E> @NotNull ImmutableList<E> copyOf(@Nullable E[] elements, @NotNull @NotNull java.lang.String name)
@Contract(value="null -> fail") @NotNull static <E> @NotNull ImmutableList<E> copyOf(@Nullable @Nullable java.util.Collection<? extends E> elements)
@Contract(value="null, _ -> fail") @NotNull static <E> @NotNull ImmutableList<E> copyOf(@Nullable @Nullable java.util.Collection<? extends E> elements, @NotNull @NotNull java.lang.String name)
@NotNull static <E> @NotNull ImmutableList.Builder<E> builder()
@NotNull static <E> @NotNull ImmutableList.Builder<E> builder(int capacity)
default boolean isEmpty()
default boolean contains(@Nullable @Nullable java.lang.Object o)
default boolean containsAll(@NotNull @NotNull java.util.Collection<?> c)
@NotNull default @NotNull ImmutableList.ImmutableListIterator<E> iterator()
@NotNull default @NotNull ImmutableList.ImmutableListIterator<E> listIterator()
listIterator
in interface java.util.List<E>
@NotNull @NotNull ImmutableList.ImmutableListIterator<E> listIterator(int index)
listIterator
in interface java.util.List<E>
@NotNull @NotNull ImmutableList<E> subList(int fromIndex, int toIndex)
subList
in interface java.util.List<E>
@NotNull default @NotNull ImmutableList<E> trim()
@Deprecated default boolean add(@Nullable E e)
@Deprecated default boolean remove(@Nullable @Nullable java.lang.Object o)
@Deprecated default boolean addAll(@NotNull @NotNull java.util.Collection<? extends E> c)
@Deprecated default boolean removeAll(@NotNull @NotNull java.util.Collection<?> c)
@Deprecated default boolean retainAll(@NotNull @NotNull java.util.Collection<?> c)
@Deprecated default boolean removeIf(@NotNull @NotNull java.util.function.Predicate<? super E> filter)
removeIf
in interface java.util.Collection<E>
@Deprecated default void clear()
@Deprecated default void add(int index, @Nullable E element)
add
in interface java.util.List<E>
@Deprecated @Nullable default E remove(int index)
remove
in interface java.util.List<E>
@Deprecated @Nullable default E set(int index, @Nullable E element)
set
in interface java.util.List<E>
@Deprecated default boolean addAll(int index, @NotNull @NotNull java.util.Collection<? extends E> c)
addAll
in interface java.util.List<E>
@Deprecated default void replaceAll(@NotNull @NotNull java.util.function.UnaryOperator<E> operator)
replaceAll
in interface java.util.List<E>