|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectariba.util.core.Sort
public class Sort
Sort provides functions for sorting arrays of objects.
| Field Summary | |
|---|---|
static int |
SortAscending
Constant to specify an ascending sort order |
static int |
SortDescending
Constant to specify a descending sort order |
static int |
SortNone
|
| Method Summary | |
|---|---|
static int |
getSwapDirection(int direction)
Returns the opposite of the given sort direction. |
static void |
objects(Object[] a,
Compare c)
Sort an array of objects into an ascending sort order. |
static void |
objects(Object[] a,
Compare c,
int dir)
Sort an array of objects in a specified direction. |
static void |
objects(Object[] a,
Object[] c1,
Compare c)
Sort two arrays in ascending order, using one array for the keys. |
static void |
objects(Object[] a,
Object[] c1,
Compare c,
int dir)
Sort two arrays in a specified order, using one array for the keys. |
static void |
objects(Object[] a,
Object[] c1,
Object[] c2,
Compare c)
Sort three arrays in ascending order, using one array for the keys. |
static void |
objects(Object[] a,
Object[] c1,
Object[] c2,
Compare c,
int dir)
Sort three arrays in a specified order, using one array for the keys. |
static void |
objects(Object[] a,
Object[] c1,
Object[] c2,
int first,
int n,
Compare c)
Sort a range of elements in three arrays in ascending order, using one array for the keys. |
static void |
objects(Object[] a,
Object[] c1,
Object[] c2,
int first,
int n,
Compare c,
int dir)
Sort a range of elements in three arrays in a specified order, using one array for the keys. |
static Compare |
reverseCompare(Compare c)
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int SortAscending
public static final int SortNone
public static final int SortDescending
| Method Detail |
|---|
public static void objects(Object[] a,
Compare c)
a - an array of objects to sortc - an object to that implements the comparison interface
public static void objects(Object[] a,
Compare c,
int dir)
a - an array of objects to sortc - an object to that implements the comparison interfacedir - the direction to sort the objects in. Must be
SortAscending or SortDescendingSortAscending,
SortDescending
public static void objects(Object[] a,
Object[] c1,
Compare c)
a - an array of objects to sortc1 - a companion array to sort in parallel with the array
a. The values in c1 do not affect the sort.c - an object to that implements the comparison interface
public static void objects(Object[] a,
Object[] c1,
Compare c,
int dir)
a - an array of objects to sortc1 - a companion array to sort in parallel with the array
a. The values in c1 do not affect the sort.c - an object to that implements the comparison interfacedir - the direction to sort the objects in. Must be
SortAscending or SortDescendingSortAscending,
SortDescending
public static void objects(Object[] a,
Object[] c1,
Object[] c2,
Compare c)
a - an array of objects to sortc1 - a companion array to sort in parallel with the array
a. The values in c1 do not affect the sort.c2 - a companion array to sort in parallel with the array
a. The values in c2 do not affect the sort.c - an object to that implements the comparison interface
public static void objects(Object[] a,
Object[] c1,
Object[] c2,
Compare c,
int dir)
a - an array of objects to sortc1 - a companion array to sort in parallel with the array
a. The values in c1 do not affect the sort.c2 - a companion array to sort in parallel with the array
a. The values in c2 do not affect the sort.c - an object to that implements the comparison interfacedir - the direction to sort the objects in. Must be
SortAscending or SortDescendingSortAscending,
SortDescending
public static void objects(Object[] a,
Object[] c1,
Object[] c2,
int first,
int n,
Compare c)
a - an array of objects to sortc1 - a companion array to sort in parallel with the array
a. The values in c1 do not affect the sort.c2 - a companion array to sort in parallel with the array
a. The values in c2 do not affect the sort.first - the first element to sortn - the number of elements to sortc - an object to that implements the comparison interface
public static void objects(Object[] a,
Object[] c1,
Object[] c2,
int first,
int n,
Compare c,
int dir)
a - an array of objects to sortc1 - a companion array to sort in parallel with the array
a. The values in c1 do not affect the sort.c2 - a companion array to sort in parallel with the array
a. The values in c2 do not affect the sort.first - the first element to sortn - the number of elements to sortc - an object to that implements the comparison interfacedir - the direction to sort the objects in. Must be
SortAscending or SortDescendingSortAscending,
SortDescendingpublic static int getSwapDirection(int direction)
direction - either SortAscending or SortDescending
SortAscending,
SortDescendingpublic static final Compare reverseCompare(Compare c)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||