E
- public final class ImmutableList<E> extends ImmutableCollection<E> implements List<E>
Modifier and Type | Method and Description |
---|---|
void |
add(int index,
E element)
Deprecated.
throws
UnsupportedOperationException |
boolean |
addAll(int index,
Collection<? extends E> newElements)
Deprecated.
throws
UnsupportedOperationException |
static <E> ImmutableList<E> |
copyOf(Collection<? extends E> list) |
static <E> ImmutableList<E> |
copyOf(E... a) |
static <E> ImmutableList<E> |
empty() |
E |
get(int index) |
int |
indexOf(Object o) |
static <E> ImmutableList<E> |
just(E e) |
int |
lastIndexOf(Object o)
Last index of.
|
ListIterator<E> |
listIterator() |
ListIterator<E> |
listIterator(int index) |
static <E> ImmutableCollection<E> |
of(Collection<? extends E> c)
Deprecated.
throws
UnsupportedOperationException |
static <E> ImmutableList<E> |
of(E... a) |
static <E> ImmutableList<E> |
of(E e) |
static <E> ImmutableList<E> |
of(List<? extends E> list) |
E |
remove(int index)
Deprecated.
throws
UnsupportedOperationException |
void |
replaceAll(UnaryOperator<E> operator)
Deprecated.
throws
UnsupportedOperationException |
E |
set(int index,
E element)
Deprecated.
throws
UnsupportedOperationException |
void |
sort(Comparator<? super E> c)
Deprecated.
throws
UnsupportedOperationException |
List<E> |
subList(int fromIndex,
int toIndex) |
add, addAll, clear, contains, equals, hashCode, iterator, remove, removeAll, removeIf, retainAll, size, streamm, toArray, toArray, toString
containsAll, isEmpty
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, spliterator, toArray, toArray
parallelStream, removeIf, stream
public static <E> ImmutableList<E> empty()
E
- public static <E> ImmutableList<E> just(E e)
E
- e
- public static <E> ImmutableList<E> of(E e)
E
- e
- @SafeVarargs public static <E> ImmutableList<E> of(E... a)
E
- a
- the elements in this array
are shared by the returned ImmutableList.public static <E> ImmutableList<E> of(List<? extends E> list)
E
- list
- the elements in this list
are shared by the returned ImmutableList.@SafeVarargs public static <E> ImmutableList<E> copyOf(E... a)
E
- a
- public static <E> ImmutableList<E> copyOf(Collection<? extends E> list)
E
- list
- @Deprecated public static <E> ImmutableCollection<E> of(Collection<? extends E> c) throws UnsupportedOperationException
UnsupportedOperationException
E
- c
- UnsupportedOperationException
public int indexOf(Object o)
public int lastIndexOf(Object o)
lastIndexOf
in interface List<E>
o
- public ListIterator<E> listIterator()
listIterator
in interface List<E>
public ListIterator<E> listIterator(int index)
listIterator
in interface List<E>
index
- @Deprecated public final boolean addAll(int index, Collection<? extends E> newElements) throws UnsupportedOperationException
UnsupportedOperationException
addAll
in interface List<E>
index
- newElements
- UnsupportedOperationException
@Deprecated public final E set(int index, E element) throws UnsupportedOperationException
UnsupportedOperationException
set
in interface List<E>
index
- element
- UnsupportedOperationException
@Deprecated public final void add(int index, E element) throws UnsupportedOperationException
UnsupportedOperationException
add
in interface List<E>
index
- element
- UnsupportedOperationException
@Deprecated public final E remove(int index) throws UnsupportedOperationException
UnsupportedOperationException
remove
in interface List<E>
index
- UnsupportedOperationException
@Deprecated public final void replaceAll(UnaryOperator<E> operator) throws UnsupportedOperationException
UnsupportedOperationException
replaceAll
in interface List<E>
operator
- UnsupportedOperationException
@Deprecated public final void sort(Comparator<? super E> c) throws UnsupportedOperationException
UnsupportedOperationException
sort
in interface List<E>
c
- UnsupportedOperationException
Copyright © 2020. All rights reserved.