E - public class ImmutableArrayList<E> extends AbstractList<E> implements RandomAccess
Using this class has the same effect as
Collections.unmodifiableList(Arrays.asList(array))
modCount| Constructor and Description |
|---|
ImmutableArrayList(E[] array)
Returns an immutable fixed-size list backed by the specified array.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(E e) |
void |
add(int index,
E element) |
boolean |
addAll(Collection<? extends E> coll) |
boolean |
addAll(int index,
Collection<? extends E> c) |
void |
clear() |
boolean |
contains(Object o) |
void |
forEach(java.util.function.Consumer<? super E> action) |
E |
get(int index) |
int |
indexOf(Object o) |
boolean |
isEmpty() |
int |
lastIndexOf(Object o) |
E |
remove(int index) |
boolean |
remove(Object o) |
boolean |
removeAll(Collection<?> coll) |
boolean |
removeIf(java.util.function.Predicate<? super E> filter) |
void |
replaceAll(java.util.function.UnaryOperator<E> operator) |
boolean |
retainAll(Collection<?> coll) |
E |
set(int index,
E element) |
int |
size() |
void |
sort(Comparator<? super E> c) |
Spliterator<E> |
spliterator() |
Object[] |
toArray() |
<T> T[] |
toArray(T[] a) |
equals, hashCode, iterator, listIterator, listIterator, removeRange, subListcontainsAll, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitcontainsAllparallelStream, streampublic ImmutableArrayList(E[] array)
array - public boolean add(E e)
add in interface Collection<E>add in interface List<E>add in class AbstractList<E>public void add(int index,
E element)
public boolean addAll(Collection<? extends E> coll)
addAll in interface Collection<E>addAll in interface List<E>addAll in class AbstractCollection<E>public boolean addAll(int index,
Collection<? extends E> c)
public void clear()
clear in interface Collection<E>clear in interface List<E>clear in class AbstractList<E>public boolean contains(Object o)
contains in interface Collection<E>contains in interface List<E>contains in class AbstractCollection<E>public void forEach(java.util.function.Consumer<? super E> action)
public E get(int index)
public int indexOf(Object o)
public boolean isEmpty()
isEmpty in interface Collection<E>isEmpty in interface List<E>isEmpty in class AbstractCollection<E>public int lastIndexOf(Object o)
lastIndexOf in interface List<E>lastIndexOf in class AbstractList<E>public E remove(int index)
public boolean remove(Object o)
remove in interface Collection<E>remove in interface List<E>remove in class AbstractCollection<E>public boolean removeAll(Collection<?> coll)
removeAll in interface Collection<E>removeAll in interface List<E>removeAll in class AbstractCollection<E>public boolean removeIf(java.util.function.Predicate<? super E> filter)
removeIf in interface Collection<E>public void replaceAll(java.util.function.UnaryOperator<E> operator)
replaceAll in interface List<E>public boolean retainAll(Collection<?> coll)
retainAll in interface Collection<E>retainAll in interface List<E>retainAll in class AbstractCollection<E>public int size()
size in interface Collection<E>size in interface List<E>size in class AbstractCollection<E>public void sort(Comparator<? super E> c)
public Spliterator<E> spliterator()
spliterator in interface Iterable<E>spliterator in interface Collection<E>spliterator in interface List<E>public Object[] toArray()
toArray in interface Collection<E>toArray in interface List<E>toArray in class AbstractCollection<E>public <T> T[] toArray(T[] a)
toArray in interface Collection<E>toArray in interface List<E>toArray in class AbstractCollection<E>Copyright © 2007-2020 Whitestein Technologies. All Rights Reserved.