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 TypeMethodDescriptionvoid
boolean
boolean
addAll
(int index, @NonNull Collection<? extends T> c) boolean
addAll
(@NonNull Collection<? extends T> c) void
clear()
boolean
boolean
containsAll
(@NonNull Collection<?> c) boolean
get
(int index) int
hashCode()
int
boolean
isEmpty()
iterator()
int
listIterator
(int index) remove
(int index) boolean
boolean
removeAll
(@NonNull Collection<?> c) boolean
retainAll
(@NonNull Collection<?> c) int
size()
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, weakCompareAndSetVolatile
Methods inherited from class java.lang.Number
byteValue, shortValue
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
Methods 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:
containsAll
in interfaceCollection<T>
- Specified by:
containsAll
in interfaceList<T>
-
addAll
-
addAll
-
removeAll
-
retainAll
-
clear
public void clear() -
get
-
set
-
add
-
remove
-
indexOf
-
lastIndexOf
- Specified by:
lastIndexOf
in interfaceList<T>
-
listIterator
- Specified by:
listIterator
in interfaceList<T>
-
listIterator
- Specified by:
listIterator
in interfaceList<T>
-
subList
-
equals
-
hashCode
public int hashCode() -
toString
- Overrides:
toString
in classAtomicInteger
-