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