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

List of all members.

Detailed Description

Title: OpenMobileIS project source
Description: sort algorythms.

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

Definition at line 40 of file Sort.java.

Static Public Member Functions

static synchronized void shellsort (Vector vec, Orderable op)
 Sort a Vector of Object references according to the ordering specified by the Orderable object instance method compareTo().
static synchronized void shellsort (Array array, Orderable op)
 Sort a CyberArray of Object references according to the ordering specified by the Orderable object instance method compareTo().
static void shellsort (Object[] data, Orderable op)
static Object[] returnANotInB (Object[] A, Object[] B, Orderable order)
 Order A and B array and return all element in A that are not in B.


Member Function Documentation

static synchronized void org.openmobileis.common.util.collection.Sort.shellsort ( Vector  vec,
Orderable  op 
) [static]

Sort a Vector of Object references according to the ordering specified by the Orderable object instance method compareTo().

Parameters:
vec the vector of Objects
op a reference to an Orderable object instance
Exceptions:
IllegalArgumentException for null arguments
See also:
Orderable

Definition at line 56 of file Sort.java.

Referenced by org.openmobileis.common.util.collection.Sort.shellsort().

static synchronized void org.openmobileis.common.util.collection.Sort.shellsort ( Array  array,
Orderable  op 
) [static]

Sort a CyberArray of Object references according to the ordering specified by the Orderable object instance method compareTo().

use shellSort

Parameters:
vec the vector of Objects
op a reference to an Orderable object instance
Exceptions:
IllegalArgumentException for null arguments
See also:
Orderable

Definition at line 91 of file Sort.java.

References org.openmobileis.common.util.collection.Array.getArrayElements(), org.openmobileis.common.util.collection.Array.setArrayElements(), org.openmobileis.common.util.collection.Sort.shellsort(), and org.openmobileis.common.util.collection.Array.size.

static Object [] org.openmobileis.common.util.collection.Sort.returnANotInB ( Object[]  A,
Object[]  B,
Orderable  order 
) [static]

Order A and B array and return all element in A that are not in B.

If A is null return null, if B is not return A sorted. Use the order to sort and compare.

Parameters:
A : element to keep
B : element to remove.
order :use to order and compare.
Returns:
all element in A that are not in B.

Definition at line 143 of file Sort.java.

References org.openmobileis.common.util.collection.Array.add(), org.openmobileis.common.util.collection.Orderable.compareTo(), org.openmobileis.common.util.collection.Array.size, and org.openmobileis.common.util.collection.Array.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