Package io.agroal.pool.util
Class StampedCopyOnWriteArrayList<T>
- java.lang.Object
-
- io.agroal.pool.util.StampedCopyOnWriteArrayList<T>
-
- All Implemented Interfaces:
Iterable<T>,Collection<T>,List<T>
public final class StampedCopyOnWriteArrayList<T> extends Object implements List<T>
- Author:
- Luis Barreiro
-
-
Constructor Summary
Constructors Constructor Description StampedCopyOnWriteArrayList(Class<? extends T> clazz)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(int index, T element)booleanadd(T element)booleanaddAll(int index, Collection<? extends T> c)booleanaddAll(Collection<? extends T> c)voidclear()booleancontains(Object o)booleancontainsAll(Collection<?> c)voidforEach(Consumer<? super T> action)Tget(int index)intindexOf(Object o)booleanisEmpty()Iterator<T>iterator()intlastIndexOf(Object o)ListIterator<T>listIterator()ListIterator<T>listIterator(int index)Stream<T>parallelStream()Tremove(int index)booleanremove(Object element)booleanremoveAll(Collection<?> c)booleanremoveIf(Predicate<? super T> filter)TremoveLast()voidreplaceAll(UnaryOperator<T> operator)booleanretainAll(Collection<?> c)Tset(int index, T element)intsize()voidsort(Comparator<? super T> c)Spliterator<T>spliterator()Stream<T>stream()List<T>subList(int fromIndex, int toIndex)Object[]toArray()<E> E[]toArray(E[] a)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Collection
toArray
-
-
-
-
Method Detail
-
size
public int size()
-
isEmpty
public boolean isEmpty()
-
add
public boolean add(T element)
-
removeLast
public T removeLast()
-
remove
public boolean remove(Object element)
-
clear
public void clear()
-
addAll
public boolean addAll(Collection<? extends T> c)
-
contains
public boolean contains(Object o)
-
toArray
public Object[] toArray()
-
toArray
public <E> E[] toArray(E[] a)
-
containsAll
public boolean containsAll(Collection<?> c)
- Specified by:
containsAllin interfaceCollection<T>- Specified by:
containsAllin interfaceList<T>
-
addAll
public boolean addAll(int index, Collection<? extends T> c)
-
removeAll
public boolean removeAll(Collection<?> c)
-
retainAll
public boolean retainAll(Collection<?> c)
-
lastIndexOf
public int lastIndexOf(Object o)
- Specified by:
lastIndexOfin interfaceList<T>
-
listIterator
public ListIterator<T> listIterator()
- Specified by:
listIteratorin interfaceList<T>
-
listIterator
public ListIterator<T> listIterator(int index)
- Specified by:
listIteratorin interfaceList<T>
-
stream
public Stream<T> stream()
- Specified by:
streamin interfaceCollection<T>
-
parallelStream
public Stream<T> parallelStream()
- Specified by:
parallelStreamin interfaceCollection<T>
-
spliterator
public Spliterator<T> spliterator()
- Specified by:
spliteratorin interfaceCollection<T>- Specified by:
spliteratorin interfaceIterable<T>- Specified by:
spliteratorin interfaceList<T>
-
removeIf
public boolean removeIf(Predicate<? super T> filter)
- Specified by:
removeIfin interfaceCollection<T>
-
replaceAll
public void replaceAll(UnaryOperator<T> operator)
- Specified by:
replaceAllin interfaceList<T>
-
sort
public void sort(Comparator<? super T> c)
-
-