org.openmobileis.common.util.collection.LongArray Class Reference

Inheritance diagram for org.openmobileis.common.util.collection.LongArray:

org.openmobileis.common.util.OpenMISSerializable List of all members.

Detailed Description

Use to store an Array of long.

Author:
Philippe Delrieu
Since:
JDK 1.1
Version:
1.0.

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


Constructor & Destructor Documentation

org.openmobileis.common.util.collection.LongArray.LongArray ( int  initialCapacity  ) 

Constructs an empty list with the specified initial capacity.

Parameters:
initialCapacity the initial capacity of the list.
Exceptions:
IllegalArgumentException if the specified initial capacity is negative

Definition at line 64 of file LongArray.java.


Member Function Documentation

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.

Parameters:
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.

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.

Returns:
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.

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.

Parameters:
index index of element to return.
Returns:
the element at the specified position in this list.
Exceptions:
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.

Parameters:
o element to be appended to this list.
Returns:
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.

Parameters:
array long to add.
Returns:
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.

Parameters:
array long to add.
Returns:
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.

Parameters:
index index in the array where element is replaced.
o element to be replaced to this ArrayList.
Returns:
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.

Parameters:
o element to be appended to this list.
Returns:
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).

Parameters:
index the index of the element to removed.
Returns:
the element that was removed from the list.
Exceptions:
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.

Parameters:
array1 first array
array2 second array
Returns:
array of long that contained in the second array and not in the first.

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().


The documentation for this class was generated from the following file:
Generated on Mon Dec 4 11:03:34 2006 for OpenMobileIS by  doxygen 1.5.1-p1