IntArray
An array with integer element.
| Methods |
|
IntArray()
Create an int array with the default initial capacity.
|
|
IntArray()
Create an int array with the default initial capacity.
|
|
IntArray(int capacity)
Create an int array with specified initial capacity.
|
|
IntArray(int capacity)
Create an int array with specified initial capacity.
Parameters:
capacity - the initial capacity
|
|
IntArray(int[] data)
Create an int array with the given values and size.
|
|
IntArray(int[] data)
Create an int array with the given values and size.
Parameters:
data - the int array
|
| void |
add(int value)
Append a value.
|
| void |
add(int value)
Append a value.
Parameters:
value - the value to append
|
| void |
ensureCapacity(int minCapacity)
Ensure the the underlying array is large enough for the given number of
entries.
|
| void |
ensureCapacity(int minCapacity)
Ensure the the underlying array is large enough for the given number of
entries.
Parameters:
minCapacity - the minimum capacity
|
| boolean |
equals(Object obj)
|
| boolean |
equals(Object obj)
|
| int |
get(int index)
Get the value at the given index.
|
| int |
get(int index)
Get the value at the given index.
Parameters:
index - the index
Returns:
the value
|
| int |
hashCode()
|
| int |
hashCode()
|
| void |
remove(int index)
Remove the value at the given index.
|
| void |
remove(int index)
Remove the value at the given index.
Parameters:
index - the index
|
| void |
removeRange(int fromIndex, int toIndex)
Remove a number of elements.
|
| void |
removeRange(int fromIndex, int toIndex)
Remove a number of elements.
Parameters:
fromIndex - the index of the first item to remove
toIndex - upper bound (exclusive)
|
| int |
size()
Get the size of the list.
|
| int |
size()
Get the size of the list.
Returns:
the size
|
| void |
toArray(int[] array)
Convert this list to an array.
|
| void |
toArray(int[] array)
Convert this list to an array. The target array must be big enough.
Parameters:
array - the target array
|
| String |
toString()
|
| String |
toString()
|