public class DynamicIntArray extends DynamicArray
Copyright 2001-2007 Partner Software, Inc.
| Modifier and Type | Field and Description |
|---|---|
int[] |
array |
arrayObject, capacity, end, fastGrowthFactor, fastGrowthLimit, slowGrowthAmount, start| Constructor and Description |
|---|
DynamicIntArray()
Creates an empty int array.
|
DynamicIntArray(int size)
Creates an int array of the given size.
|
DynamicIntArray(int[] array)
Creates an int array from the given base array.
|
DynamicIntArray(int first,
int... rest)
VarArgs constructor, lets you set the initial values.
|
DynamicIntArray(java.lang.String values)
Creates a double array, parsing the given input string as a space-delimited list of values.
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(int what)
Appends a single int to the end of this array.
|
void |
append(int... stuff)
Appends the given doubles 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 DynamicIntArray()
public DynamicIntArray(int size)
public DynamicIntArray(int[] array)
array - array to use as backing array.public DynamicIntArray(int first,
int... rest)
first - first valuerest - other valuespublic DynamicIntArray(java.lang.String values)
public void add(int what)
public void append(int... 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