|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.openmobileis.common.util.collection.LongArray
Use to store an Array of long.
Field Summary | |
protected static long |
serialVersionUID
|
Constructor Summary | |
LongArray()
Constructs an empty list. |
|
LongArray(int initialCapacity)
Constructs an empty list with the specified initial capacity. |
Method Summary | |
boolean |
add(int index,
long o)
Appends the specified element to the end of this list. |
boolean |
add(long o)
Appends the specified element to the end of this list. |
boolean |
add(long[] array)
Appends the specified LongArray to the end of this list. |
boolean |
add(LongArray array)
Appends the specified LongArray to the end of this list. |
void |
addIntersect(long[] array)
|
void |
addUnion(long[] array)
|
void |
clear()
|
static long[] |
diffLongArray(long[] array1,
long[] array2)
return a array containing all element of the second array that is not in the first one. |
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. |
long |
get(int index)
Returns the element at the specified position in this list. |
protected long[] |
getArrayElements()
|
static long[] |
intersectLongArray(long[] array1,
long[] array2)
|
boolean |
isEmpty()
Tests if this list has no elements. |
long |
remove(int index)
Removes the element at the specified position in this list. |
boolean |
replace(int index,
long o)
replace at the specified index the element. |
protected void |
setArrayElements(long[] array)
|
static void |
shellsort(long[] data)
|
int |
size()
Returns the number of elements in this list. |
long[] |
toArray()
Returns an array containing all of the elements in this list in the correct order. |
static long[] |
unionLongArray(long[] array1,
long[] array2)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected static final long serialVersionUID
Constructor Detail |
public LongArray(int initialCapacity)
initialCapacity
- the initial capacity of the list.
java.lang.IllegalArgumentException
- if the specified initial capacity
is negativepublic LongArray()
Method Detail |
public void clear()
protected long[] getArrayElements()
protected void setArrayElements(long[] array)
public void ensureCapacity(int minCapacity)
minCapacity
- the desired minimum capacity.public int size()
public boolean isEmpty()
public long[] toArray()
public long get(int index)
index
- index of element to return.
java.lang.IndexOutOfBoundsException
- if index is out of range (index
< 0 || index >= size()).public boolean add(long o)
o
- element to be appended to this list.
public boolean add(LongArray array)
array
- long to add.
public boolean add(long[] array)
array
- long to add.
public boolean replace(int index, long o)
index
- index in the array where element is replaced.o
- element to be replaced to this ArrayList.
public boolean add(int index, long o)
o
- element to be appended to this list.
public long remove(int index)
index
- the index of the element to removed.
java.lang.IndexOutOfBoundsException
- if index out of range (index
< 0 || index >= size()).public void addIntersect(long[] array)
public void addUnion(long[] array)
public static void shellsort(long[] data)
public static long[] intersectLongArray(long[] array1, long[] array2)
public static long[] unionLongArray(long[] array1, long[] array2)
public static long[] diffLongArray(long[] array1, long[] array2)
array1
- first arrayarray2
- second array
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |