public final class IntBigArray extends Object
| Constructor and Description |
|---|
IntBigArray()
Creates a new big array containing one initial segment
|
IntBigArray(int initialValue)
Creates a new big array containing one initial segment filled with the specified default value
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(long index,
int value)
Adds the specified value to the specified element of this big array.
|
void |
ensureCapacity(long length)
Ensures this big array is at least the specified length.
|
void |
fill(int value) |
int |
get(long index)
Returns the element of this big array at specified index.
|
int[][] |
getSegments() |
void |
increment(long index)
Increments the element of this big array at specified index.
|
void |
set(long index,
int value)
Sets the element of this big array at specified index.
|
long |
sizeOf()
Returns the size of this big array in bytes.
|
void |
sort(int from,
int to,
IntComparator comparator) |
public IntBigArray()
public IntBigArray(int initialValue)
public int[][] getSegments()
public long sizeOf()
public int get(long index)
index - a position in this big array.public void set(long index,
int value)
index - a position in this big array.public void increment(long index)
index - a position in this big array.public void add(long index,
int value)
index - a position in this big array.value - the valuepublic void ensureCapacity(long length)
public void fill(int value)
public void sort(int from,
int to,
IntComparator comparator)
Copyright © 2012–2022. All rights reserved.