Class VolatileSizeArrayList<T>
java.lang.Object
java.lang.Number
java.util.concurrent.atomic.AtomicInteger
io.reactivex.rxjava3.internal.util.VolatileSizeArrayList<T>
- Type Parameters:
T- the element type
- All Implemented Interfaces:
Serializable,Iterable<T>,Collection<T>,List<T>,RandomAccess,SequencedCollection<T>
Tracks the current underlying array size in a volatile field.
- Since:
- 2.0.7
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final long -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidbooleanbooleanaddAll(int index, @NonNull Collection<? extends T> c) booleanaddAll(@NonNull Collection<? extends T> c) voidclear()booleanbooleancontainsAll(@NonNull Collection<?> c) booleanget(int index) inthashCode()intbooleanisEmpty()iterator()intlistIterator(int index) remove(int index) booleanbooleanremoveAll(@NonNull Collection<?> c) booleanretainAll(@NonNull Collection<?> c) intsize()subList(int fromIndex, int toIndex) Object[]toArray()<E> E[]toArray(E[] a) toString()Methods inherited from class java.util.concurrent.atomic.AtomicInteger
accumulateAndGet, addAndGet, compareAndExchange, compareAndExchangeAcquire, compareAndExchangeRelease, compareAndSet, decrementAndGet, doubleValue, floatValue, get, getAcquire, getAndAccumulate, getAndAdd, getAndDecrement, getAndIncrement, getAndSet, getAndUpdate, getOpaque, getPlain, incrementAndGet, intValue, lazySet, longValue, set, setOpaque, setPlain, setRelease, updateAndGet, weakCompareAndSet, weakCompareAndSetAcquire, weakCompareAndSetPlain, weakCompareAndSetRelease, weakCompareAndSetVolatileMethods inherited from class java.lang.Number
byteValue, shortValueMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArrayMethods inherited from interface java.util.List
addFirst, addLast, getFirst, getLast, removeFirst, removeLast, replaceAll, reversed, sort, spliterator
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
list
-
-
Constructor Details
-
VolatileSizeArrayList
public VolatileSizeArrayList() -
VolatileSizeArrayList
public VolatileSizeArrayList(int initialCapacity)
-
-
Method Details
-
size
public int size() -
isEmpty
public boolean isEmpty() -
contains
-
iterator
-
toArray
-
toArray
-
add
-
remove
-
containsAll
- Specified by:
containsAllin interfaceCollection<T>- Specified by:
containsAllin interfaceList<T>
-
addAll
-
addAll
-
removeAll
-
retainAll
-
clear
public void clear() -
get
-
set
-
add
-
remove
-
indexOf
-
lastIndexOf
- Specified by:
lastIndexOfin interfaceList<T>
-
listIterator
- Specified by:
listIteratorin interfaceList<T>
-
listIterator
- Specified by:
listIteratorin interfaceList<T>
-
subList
-
equals
-
hashCode
public int hashCode() -
toString
- Overrides:
toStringin classAtomicInteger
-