Inheritance diagram for org.openmobileis.common.util.collection.LongArray:
Definition at line 42 of file LongArray.java.
Public Member Functions | |
LongArray (int initialCapacity) | |
Constructs an empty list with the specified initial capacity. | |
LongArray () | |
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. | |
long[] | toArray () |
Returns an array containing all of the elements in this list in the correct order. | |
long | get (int index) |
Returns the element at the specified position in this list. | |
boolean | add (long o) |
Appends the specified element to the end of this list. | |
boolean | add (LongArray array) |
Appends the specified LongArray to the end of this list. | |
boolean | add (long[] array) |
Appends the specified LongArray to the end of this list. | |
boolean | replace (int index, long o) |
replace at the specified index the element. | |
boolean | add (int index, long 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. | |
void | addIntersect (long[] array) |
void | addUnion (long[] array) |
Static Public Member Functions | |
static void | shellsort (long[] data) |
static long[] | intersectLongArray (long[] array1, long[] array2) |
static long[] | unionLongArray (long[] array1, long[] array2) |
static long[] | diffLongArray (long[] array1, long[] array2) |
return a array containing all element of the second array that is not in the first one. | |
Protected Member Functions | |
long[] | getArrayElements () |
void | setArrayElements (long[] array) |
Static Protected Attributes | |
static final long | serialVersionUID = 5521257935120563452L |
org.openmobileis.common.util.collection.LongArray.LongArray | ( | 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 64 of file LongArray.java.
void org.openmobileis.common.util.collection.LongArray.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 99 of file LongArray.java.
References org.openmobileis.common.util.collection.LongArray.size().
Referenced by org.openmobileis.common.util.collection.LongArray.add().
int org.openmobileis.common.util.collection.LongArray.size | ( | ) |
Returns the number of elements in this list.
Definition at line 116 of file LongArray.java.
Referenced by org.openmobileis.common.util.collection.LongArray.add(), org.openmobileis.common.util.collection.LongArray.clear(), org.openmobileis.common.util.collection.LongArray.ensureCapacity(), org.openmobileis.common.util.collection.LongArray.isEmpty(), org.openmobileis.common.util.collection.LongArray.remove(), org.openmobileis.common.util.collection.LongArray.replace(), and org.openmobileis.common.util.collection.LongArray.toArray().
boolean org.openmobileis.common.util.collection.LongArray.isEmpty | ( | ) |
Tests if this list has no elements.
true
if this list has no elements; false
otherwise. Definition at line 126 of file LongArray.java.
References org.openmobileis.common.util.collection.LongArray.size().
long [] org.openmobileis.common.util.collection.LongArray.toArray | ( | ) |
Returns an array containing all of the elements in this list in the correct order.
Definition at line 137 of file LongArray.java.
References org.openmobileis.common.util.collection.LongArray.size().
Referenced by org.openmobileis.common.util.collection.LongArray.diffLongArray(), org.openmobileis.database.fastobjectdb.db.query.soda.FODBSodaQuery.execute(), org.openmobileis.common.util.collection.LongArray.intersectLongArray(), org.openmobileis.database.fastobjectdb.db.index.FODBStringIndex.query(), org.openmobileis.database.fastobjectdb.db.index.FODBLongIndex.query(), org.openmobileis.database.fastobjectdb.db.index.FODBIntIndex.query(), and org.openmobileis.common.util.collection.LongArray.unionLongArray().
long org.openmobileis.common.util.collection.LongArray.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 155 of file LongArray.java.
boolean org.openmobileis.common.util.collection.LongArray.add | ( | long | 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 168 of file LongArray.java.
References org.openmobileis.common.util.collection.LongArray.ensureCapacity(), and org.openmobileis.common.util.collection.LongArray.size().
Referenced by org.openmobileis.common.util.collection.LongArray.diffLongArray(), org.openmobileis.common.util.collection.LongArray.intersectLongArray(), and org.openmobileis.common.util.collection.LongArray.unionLongArray().
boolean org.openmobileis.common.util.collection.LongArray.add | ( | LongArray | 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 181 of file LongArray.java.
References org.openmobileis.common.util.collection.LongArray.ensureCapacity(), org.openmobileis.common.util.collection.LongArray.getArrayElements(), and org.openmobileis.common.util.collection.LongArray.size().
boolean org.openmobileis.common.util.collection.LongArray.add | ( | long[] | 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 195 of file LongArray.java.
References org.openmobileis.common.util.collection.LongArray.ensureCapacity(), and org.openmobileis.common.util.collection.LongArray.size().
boolean org.openmobileis.common.util.collection.LongArray.replace | ( | int | index, | |
long | 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 212 of file LongArray.java.
References org.openmobileis.common.util.collection.LongArray.size().
boolean org.openmobileis.common.util.collection.LongArray.add | ( | int | index, | |
long | 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 227 of file LongArray.java.
References org.openmobileis.common.util.collection.LongArray.ensureCapacity(), and org.openmobileis.common.util.collection.LongArray.size().
long org.openmobileis.common.util.collection.LongArray.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 246 of file LongArray.java.
References org.openmobileis.common.util.collection.LongArray.size().
static long [] org.openmobileis.common.util.collection.LongArray.diffLongArray | ( | long[] | array1, | |
long[] | array2 | |||
) | [static] |
return a array containing all element of the second array that is not in the first one.
array1 | first array | |
array2 | second array |
Definition at line 401 of file LongArray.java.
References org.openmobileis.common.util.collection.LongArray.add(), org.openmobileis.common.util.collection.LongArray.LongArray(), and org.openmobileis.common.util.collection.LongArray.toArray().