public final class ArrayLongBig extends Object
toArray()
the data is copied to the result
long[].Constructor and Description |
---|
ArrayLongBig()
Create an
LongArray . |
Modifier and Type | Method and Description |
---|---|
void |
add(long element)
Add long to
LongArray . |
void |
addAll(long[] elements)
Add long[] to
LongArray . |
long |
consumption()
Get memory consumption of
LongArray . |
long |
get(int index)
Get long at index from
LongArray . |
int |
length()
Get length of
LongArray . |
long[] |
toArray()
Convert
LongArray to long[]. |
public ArrayLongBig()
LongArray
. Memory consumption is equal to creating
a new ArrayList
.public final void add(long element)
LongArray
.element
- long which should be addedpublic final void addAll(long[] elements)
LongArray
.elements
- long[] which should be addedpublic final long get(int index) throws IndexOutOfBoundsException
LongArray
.index
- index of long which should be returnedIndexOutOfBoundsException
public final int length()
LongArray
.LongArray
public final long consumption()
LongArray
.LongArray
public final long[] toArray()
LongArray
to long[]. This operation is the only one
where the internal data is copied. It is directly copied to the long[]
which is returned, so don't call this method more than once when done.LongArray