Main Page | Packages | Class Hierarchy | Class List | Directories | File List | Class Members | Related Pages

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 41 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 62 of file LongArray.java.


Member Function Documentation

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 218 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.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 189 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.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 175 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  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 163 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().

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

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 97 of file LongArray.java.

References org.openmobileis.common.util.collection.LongArray.size().

Referenced by org.openmobileis.common.util.collection.LongArray.add().

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 151 of file LongArray.java.

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 124 of file LongArray.java.

References 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 236 of file LongArray.java.

References 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 204 of file LongArray.java.

References org.openmobileis.common.util.collection.LongArray.size().

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

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


The documentation for this class was generated from the following file:
Generated on Wed Dec 14 21:05:37 2005 for OpenMobileIS by  doxygen 1.4.4