public final class ConcurrentAppendOnlyChunkedList<T> extends Object
Integer.MAX_VALUE.| Constructor and Description |
|---|
ConcurrentAppendOnlyChunkedList(int chunkSize) |
| Modifier and Type | Method and Description |
|---|---|
void |
add(T e)
Appends the specified element to the end of this collection.
|
void |
addAll(T[] elements)
It appends
elements to the collection. |
T |
get(int index)
Returns the element at the specified position in this collection or
null if not found. |
int |
size()
It returns the number of elements currently added.
|
T[] |
toArray(java.util.function.IntFunction<T[]> arrayAllocator)
Returns an array containing all of the elements in this collection in proper
sequence (from first to last element).
arrayAllocator will be used to instantiate the array of the correct size with the right runtime type. |
public ConcurrentAppendOnlyChunkedList(int chunkSize)
IllegalArgumentException - if chunkSize is <0 or not a power of 2public int size()
public void addAll(T[] elements)
elements to the collection.public T get(int index)
null if not found.public void add(T e)
NullPointerException - if e is nullpublic T[] toArray(java.util.function.IntFunction<T[]> arrayAllocator)
arrayAllocator will be used to instantiate the array of the correct size with the right runtime type.Copyright © 2020 The Apache Software Foundation. All Rights Reserved.