E
- public class ImmutableArrayList<E>
extends java.util.AbstractList<E>
implements java.util.RandomAccess
Using this class has the same effect as
Collections.unmodifiableList(Arrays.asList(array))
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(java.util.Collection<? extends E> coll) |
boolean |
addAll(int index,
java.util.Collection<? extends E> c) |
void |
clear() |
boolean |
contains(java.lang.Object o) |
void |
forEach(java.util.function.Consumer<? super E> action) |
E |
get(int index) |
int |
indexOf(java.lang.Object o) |
boolean |
isEmpty() |
int |
lastIndexOf(java.lang.Object o) |
E |
remove(int index) |
boolean |
remove(java.lang.Object o) |
boolean |
removeAll(java.util.Collection<?> coll) |
boolean |
removeIf(java.util.function.Predicate<? super E> filter) |
void |
replaceAll(java.util.function.UnaryOperator<E> operator) |
boolean |
retainAll(java.util.Collection<?> coll) |
E |
set(int index,
E element) |
int |
size() |
void |
sort(java.util.Comparator<? super E> c) |
java.util.Spliterator<E> |
spliterator() |
java.lang.Object[] |
toArray() |
<T> T[] |
toArray(T[] a) |
equals, hashCode, iterator, listIterator, listIterator, removeRange, subList
public ImmutableArrayList(E[] array)
array
- public boolean add(E e)
public void add(int index, E element)
public boolean addAll(java.util.Collection<? extends E> coll)
public boolean addAll(int index, java.util.Collection<? extends E> c)
public void clear()
public boolean contains(java.lang.Object o)
public void forEach(java.util.function.Consumer<? super E> action)
forEach
in interface java.lang.Iterable<E>
public E get(int index)
public int indexOf(java.lang.Object o)
public boolean isEmpty()
public int lastIndexOf(java.lang.Object o)
public E remove(int index)
public boolean remove(java.lang.Object o)
public boolean removeAll(java.util.Collection<?> coll)
public boolean removeIf(java.util.function.Predicate<? super E> filter)
removeIf
in interface java.util.Collection<E>
public void replaceAll(java.util.function.UnaryOperator<E> operator)
replaceAll
in interface java.util.List<E>
public boolean retainAll(java.util.Collection<?> coll)
public int size()
public void sort(java.util.Comparator<? super E> c)
sort
in interface java.util.List<E>
public java.util.Spliterator<E> spliterator()
public java.lang.Object[] toArray()
Copyright © 2007-2020 Whitestein Technologies. All Rights Reserved.