public final class ObjectBigArray<T> extends Object
| Constructor and Description |
|---|
ObjectBigArray()
Creates a new big array containing one initial segment
|
ObjectBigArray(Object initialValue) |
| Modifier and Type | Method and Description |
|---|---|
void |
ensureCapacity(long length)
Ensures this big array is at least the specified length.
|
T |
get(long index)
Returns the element of this big array at specified index.
|
T |
getAndSet(long index,
T replacement)
Gets the element of this big array at specified index and then sets the provided
replacement value to the same index
|
long |
getCapacity()
Returns the current capacity of this big array
|
void |
set(long index,
T value)
Sets the element of this big array at specified index.
|
boolean |
setIfNull(long index,
T value)
Sets the element of this big array at specified index if and only if the existing value
at that index is null
|
long |
sizeOf()
Returns the size of this big array in bytes.
|
public ObjectBigArray()
public ObjectBigArray(Object initialValue)
public long sizeOf()
public long getCapacity()
public T get(long index)
index - a position in this big array.public T getAndSet(long index, T replacement)
index - a position in this big array.public void set(long index,
T value)
index - a position in this big array.public boolean setIfNull(long index,
T value)
index - a position in this big array.public void ensureCapacity(long length)
Copyright © 2012–2022. All rights reserved.