public final class ImmutableList<E> extends Object implements List<E>, Serializable
Constructor and Description |
---|
ImmutableList(Collection<E> collection) |
ImmutableList(E... elements) |
Modifier and Type | Method and Description |
---|---|
boolean |
add(E object) |
void |
add(int location,
E object) |
boolean |
addAll(Collection<? extends E> collection) |
boolean |
addAll(int location,
Collection<? extends E> collection) |
void |
clear() |
boolean |
contains(Object object) |
boolean |
containsAll(Collection<?> collection) |
E |
get(int location) |
int |
indexOf(Object object) |
boolean |
isEmpty() |
Iterator<E> |
iterator() |
int |
lastIndexOf(Object object) |
ListIterator<E> |
listIterator() |
ListIterator<E> |
listIterator(int location) |
E |
remove(int location) |
boolean |
remove(Object object) |
boolean |
removeAll(Collection<?> collection) |
boolean |
retainAll(Collection<?> collection) |
E |
set(int location,
E object) |
int |
size() |
List<E> |
subList(int start,
int end) |
Object[] |
toArray() |
<T> T[] |
toArray(T[] array) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
equals, hashCode, replaceAll, sort, spliterator
parallelStream, removeIf, stream
@SafeVarargs public ImmutableList(E... elements)
public ImmutableList(@NonNull Collection<E> collection)
public boolean add(E object)
public boolean addAll(int location, @NonNull Collection<? extends E> collection)
public boolean addAll(@NonNull Collection<? extends E> collection)
public void clear()
public boolean contains(Object object)
public boolean containsAll(@NonNull Collection<?> collection)
containsAll
in interface Collection<E>
containsAll
in interface List<E>
public boolean isEmpty()
public int lastIndexOf(Object object)
lastIndexOf
in interface List<E>
public ListIterator<E> listIterator()
listIterator
in interface List<E>
@NonNull public ListIterator<E> listIterator(int location)
listIterator
in interface List<E>
public boolean remove(Object object)
public boolean removeAll(@NonNull Collection<?> collection)
public boolean retainAll(@NonNull Collection<?> collection)
public int size()