public final class ImmutableList<E> extends Object implements List<E>
Modifier and Type | Method and Description |
---|---|
boolean |
add(E e)
Deprecated.
|
void |
add(int index,
E element)
Deprecated.
|
boolean |
addAll(Collection<? extends E> c)
Deprecated.
|
boolean |
addAll(int index,
Collection<? extends E> c)
Deprecated.
|
void |
clear()
Deprecated.
|
boolean |
contains(Object o) |
boolean |
containsAll(Collection<?> c) |
static <E> ImmutableList<E> |
copyOf(Collection<E> collection) |
static <E> ImmutableList<E> |
copyOf(List<E> list) |
boolean |
equals(Object obj) |
E |
get(int index) |
int |
hashCode() |
int |
indexOf(Object o) |
boolean |
isEmpty() |
Iterator<E> |
iterator() |
int |
lastIndexOf(Object o) |
ListIterator<E> |
listIterator() |
ListIterator<E> |
listIterator(int index) |
static <E> ImmutableList<E> |
of(E... elements) |
E |
remove(int index)
Deprecated.
|
boolean |
remove(Object o)
Deprecated.
|
boolean |
removeAll(Collection<?> c)
Deprecated.
|
boolean |
retainAll(Collection<?> c)
Deprecated.
|
E |
set(int index,
E element)
Deprecated.
|
int |
size() |
List<E> |
subList(int fromIndex,
int toIndex) |
Object[] |
toArray() |
<T> T[] |
toArray(T[] a) |
String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
replaceAll, sort, spliterator
parallelStream, removeIf, stream
public static <E> ImmutableList<E> copyOf(List<E> list)
public static <E> ImmutableList<E> copyOf(Collection<E> collection)
public static <E> ImmutableList<E> of(E... elements)
public int size()
public boolean isEmpty()
public boolean contains(Object o)
public Object[] toArray()
public <T> T[] toArray(T[] a)
@Deprecated public boolean add(E e)
@Deprecated public boolean remove(Object o)
public boolean containsAll(Collection<?> c)
containsAll
in interface Collection<E>
containsAll
in interface List<E>
@Deprecated public boolean addAll(Collection<? extends E> c)
@Deprecated public boolean addAll(int index, Collection<? extends E> c)
@Deprecated public boolean removeAll(Collection<?> c)
@Deprecated public boolean retainAll(Collection<?> c)
@Deprecated public void clear()
@Deprecated public E set(int index, E element)
@Deprecated public void add(int index, E element)
@Deprecated public E remove(int index)
public int lastIndexOf(Object o)
lastIndexOf
in interface List<E>
public ListIterator<E> listIterator()
listIterator
in interface List<E>
public ListIterator<E> listIterator(int index)
listIterator
in interface List<E>
public int hashCode()
public boolean equals(Object obj)