public final class CopyOnFirstWriteList<E> extends AbstractList<E> implements List<E>, Serializable
Constructor and Description |
---|
CopyOnFirstWriteList(List<E> list) |
Modifier and Type | Method and Description |
---|---|
boolean |
add(E e) |
void |
add(int index,
E element) |
boolean |
addAll(Collection<? extends E> c) |
boolean |
addAll(int index,
Collection<? extends E> c) |
void |
clear() |
boolean |
contains(Object o) |
boolean |
containsAll(Collection<?> c) |
boolean |
equals(Object o) |
E |
get(int index) |
int |
hashCode() |
int |
indexOf(Object o) |
boolean |
isEmpty() |
int |
lastIndexOf(Object o) |
E |
remove(int index) |
boolean |
remove(Object o) |
boolean |
removeAll(Collection<?> c) |
boolean |
removeIf(java.util.function.Predicate<? super E> filter) |
void |
replaceAll(java.util.function.UnaryOperator<E> operator) |
boolean |
retainAll(Collection<?> c) |
E |
set(int index,
E element) |
int |
size() |
void |
sort(Comparator<? super E> c) |
Object[] |
toArray() |
<T> T[] |
toArray(T[] a) |
iterator, listIterator, listIterator, subList
toString
iterator, listIterator, listIterator, spliterator, subList
parallelStream, stream
public CopyOnFirstWriteList(List<E> list)
public int size()
size
in interface Collection<E>
size
in interface List<E>
size
in class AbstractCollection<E>
public boolean isEmpty()
isEmpty
in interface Collection<E>
isEmpty
in interface List<E>
isEmpty
in class AbstractCollection<E>
public boolean contains(Object o)
contains
in interface Collection<E>
contains
in interface List<E>
contains
in class AbstractCollection<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>
public boolean add(E e)
add
in interface Collection<E>
add
in interface List<E>
add
in class AbstractList<E>
public boolean remove(Object o)
remove
in interface Collection<E>
remove
in interface List<E>
remove
in class AbstractCollection<E>
public boolean containsAll(Collection<?> c)
containsAll
in interface Collection<E>
containsAll
in interface List<E>
containsAll
in class AbstractCollection<E>
public boolean addAll(Collection<? extends E> c)
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 boolean removeAll(Collection<?> c)
removeAll
in interface Collection<E>
removeAll
in interface List<E>
removeAll
in class AbstractCollection<E>
public boolean retainAll(Collection<?> c)
retainAll
in interface Collection<E>
retainAll
in interface List<E>
retainAll
in class AbstractCollection<E>
public void replaceAll(java.util.function.UnaryOperator<E> operator)
replaceAll
in interface List<E>
public boolean removeIf(java.util.function.Predicate<? super E> filter)
removeIf
in interface Collection<E>
public void clear()
clear
in interface Collection<E>
clear
in interface List<E>
clear
in class AbstractList<E>
public boolean equals(Object o)
equals
in interface Collection<E>
equals
in interface List<E>
equals
in class AbstractList<E>
public int hashCode()
hashCode
in interface Collection<E>
hashCode
in interface List<E>
hashCode
in class AbstractList<E>
public int lastIndexOf(Object o)
lastIndexOf
in interface List<E>
lastIndexOf
in class AbstractList<E>
Copyright © 2019. All rights reserved.