public final class DynamicIntArray extends Object
The motivation for this class is memory optimization, i.e. space efficient storage of potentially huge arrays without good a-priori size guesses.
The API of this class is between a primitive array and a AbstractList. It's not a Collection implementation because it handles primitive types, but the API could be extended to support iterators and the like.
NOTE: Like standard Collection implementations/arrays, this class is not synchronized.
Constructor and Description |
---|
DynamicIntArray() |
DynamicIntArray(int chunkSize) |
Modifier and Type | Method and Description |
---|---|
void |
add(int value) |
void |
clear() |
int |
get(int index) |
int |
getSizeInBytes() |
void |
increment(int index,
int value) |
void |
set(int index,
int value) |
int |
size() |
String |
toString() |
public DynamicIntArray()
public DynamicIntArray(int chunkSize)
Copyright © 2013–2023 The Apache Software Foundation. All rights reserved.