public class DynamicLongArray extends DynamicArray
| Modifier and Type | Field and Description |
|---|---|
long[] |
array |
arrayObject, capacity, end, fastGrowthFactor, fastGrowthLimit, slowGrowthAmount, start| Constructor and Description |
|---|
DynamicLongArray()
Creates an empty long array.
|
DynamicLongArray(int size)
Creates a long array of the given size.
|
DynamicLongArray(long first,
long... rest)
VarArgs constructor, lets you set the initial values.
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(long what)
Appends a single long to the end of this array.
|
void |
append(long... stuff)
Appends the given longs to the end of this array.
|
java.lang.String |
contentsToString()
Returns the contents as a String.
|
void |
newArray(int size)
Allocates a new, empty array of the given size and assign it to the
arrayObject property.
|
DynamicByteArray |
toDynamicByteArray() |
int[] |
toIntArray() |
append, clear, copy, copy, copyExactly, copyFrom, copyTo, insert, isEmpty, makeRoomFor, makeRoomFor, pack, remove, size, subsection, tidy, toStringpublic DynamicLongArray()
public DynamicLongArray(int size)
public DynamicLongArray(long first,
long... rest)
first - first valuerest - other valuespublic void add(long what)
public void append(long... stuff)
public java.lang.String contentsToString()
public DynamicByteArray toDynamicByteArray()
public final int[] toIntArray()
public void newArray(int size)
DynamicArray
public abstract void newArray(int size) {
arrayObject = array = new Foo[size];
}
newArray in class DynamicArray