Definition at line 40 of file IntArray.java.
Public Member Functions | |
IntArray (int initialCapacity) | |
Constructs an empty list with the specified initial capacity. | |
IntArray () | |
Constructs an empty list. | |
void | clear () |
void | ensureCapacity (int minCapacity) |
Increases the capacity of this ArrayList instance, if necessary, to ensure that it can hold at least the number of elements specified by the minimum capacity argument. | |
int | size () |
Returns the number of elements in this list. | |
boolean | isEmpty () |
Tests if this list has no elements. | |
boolean | contains (int o) |
return true if the array contains the specified int false otherwise. | |
int[] | toArray () |
Returns an array containing all of the elements in this list in the correct order. | |
int | get (int index) |
Returns the element at the specified position in this list. | |
boolean | add (int o) |
Appends the specified element to the end of this list. | |
boolean | add (IntArray array) |
Appends the specified LongArray to the end of this list. | |
boolean | replace (int index, int o) |
replace at the specified index the element. | |
boolean | add (int[] array) |
Appends the specified LongArray to the end of this list. | |
boolean | add (int index, int o) |
Appends the specified element to the end of this list. | |
long | remove (int index) |
Removes the element at the specified position in this list. | |
Protected Member Functions | |
int[] | getArrayElements () |
void | setArrayElements (int[] array) |
Static Protected Attributes | |
static final long | serialVersionUID = 5521257935120563452L |
org.openmobileis.common.util.collection.IntArray.IntArray | ( | int | initialCapacity | ) |
Constructs an empty list with the specified initial capacity.
initialCapacity | the initial capacity of the list. |
IllegalArgumentException | if the specified initial capacity is negative |
Definition at line 61 of file IntArray.java.
void org.openmobileis.common.util.collection.IntArray.ensureCapacity | ( | int | minCapacity | ) |
Increases the capacity of this ArrayList
instance, if necessary, to ensure that it can hold at least the number of elements specified by the minimum capacity argument.
minCapacity | the desired minimum capacity. |
Definition at line 97 of file IntArray.java.
References org.openmobileis.common.util.collection.IntArray.size().
Referenced by org.openmobileis.common.util.collection.IntArray.add().
int org.openmobileis.common.util.collection.IntArray.size | ( | ) |
Returns the number of elements in this list.
Definition at line 114 of file IntArray.java.
Referenced by org.openmobileis.common.util.collection.IntArray.add(), org.openmobileis.common.util.collection.IntArray.clear(), org.openmobileis.common.util.collection.IntArray.contains(), org.openmobileis.common.util.collection.IntArray.ensureCapacity(), org.openmobileis.common.util.collection.IntArray.isEmpty(), org.openmobileis.common.util.collection.IntArray.remove(), org.openmobileis.common.util.collection.IntArray.replace(), and org.openmobileis.common.util.collection.IntArray.toArray().
boolean org.openmobileis.common.util.collection.IntArray.isEmpty | ( | ) |
Tests if this list has no elements.
true
if this list has no elements; false
otherwise. Definition at line 124 of file IntArray.java.
References org.openmobileis.common.util.collection.IntArray.size().
boolean org.openmobileis.common.util.collection.IntArray.contains | ( | int | o | ) |
return true if the array contains the specified int false otherwise.
int | o : the int to be tested. |
true
if the specified int is inside the array. Definition at line 134 of file IntArray.java.
References org.openmobileis.common.util.collection.IntArray.size().
int [] org.openmobileis.common.util.collection.IntArray.toArray | ( | ) |
Returns an array containing all of the elements in this list in the correct order.
Definition at line 151 of file IntArray.java.
References org.openmobileis.common.util.collection.IntArray.size().
int org.openmobileis.common.util.collection.IntArray.get | ( | int | index | ) |
Returns the element at the specified position in this list.
index | index of element to return. |
IndexOutOfBoundsException | if index is out of range (index < 0 || index >= size()) . |
Definition at line 168 of file IntArray.java.
boolean org.openmobileis.common.util.collection.IntArray.add | ( | int | o | ) |
Appends the specified element to the end of this list.
o | element to be appended to this list. |
true
(as per the general contract of Collection.add). Definition at line 181 of file IntArray.java.
References org.openmobileis.common.util.collection.IntArray.ensureCapacity(), and org.openmobileis.common.util.collection.IntArray.size().
boolean org.openmobileis.common.util.collection.IntArray.add | ( | IntArray | array | ) |
Appends the specified LongArray to the end of this list.
array | long to add. |
true
(as per the general contract of Collection.add). Definition at line 193 of file IntArray.java.
References org.openmobileis.common.util.collection.IntArray.ensureCapacity(), org.openmobileis.common.util.collection.IntArray.getArrayElements(), and org.openmobileis.common.util.collection.IntArray.size().
boolean org.openmobileis.common.util.collection.IntArray.replace | ( | int | index, | |
int | o | |||
) |
replace at the specified index the element.
if there is no element at index add the new one at the end of the array.
index | index in the array where element is replaced. | |
o | element to be replaced to this ArrayList. |
true
. Definition at line 209 of file IntArray.java.
References org.openmobileis.common.util.collection.IntArray.size().
boolean org.openmobileis.common.util.collection.IntArray.add | ( | int[] | array | ) |
Appends the specified LongArray to the end of this list.
array | long to add. |
true
(as per the general contract of Collection.add). Definition at line 223 of file IntArray.java.
References org.openmobileis.common.util.collection.IntArray.ensureCapacity(), and org.openmobileis.common.util.collection.IntArray.size().
boolean org.openmobileis.common.util.collection.IntArray.add | ( | int | index, | |
int | o | |||
) |
Appends the specified element to the end of this list.
o | element to be appended to this list. |
true
(as per the general contract of Collection.add). Definition at line 237 of file IntArray.java.
References org.openmobileis.common.util.collection.IntArray.ensureCapacity(), and org.openmobileis.common.util.collection.IntArray.size().
long org.openmobileis.common.util.collection.IntArray.remove | ( | int | index | ) |
Removes the element at the specified position in this list.
Shifts any subsequent elements to the left (subtracts one from their indices).
index | the index of the element to removed. |
IndexOutOfBoundsException | if index out of range (index < 0 || index >= size()) . |
Definition at line 257 of file IntArray.java.
References org.openmobileis.common.util.collection.IntArray.size().