|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--swing.addon.util.Sorter
This class defines a bunch of static methods for efficiently sorting arrays of Strings or other objects. It also defines two interfaces that provide two different ways of comparing objects to be sorted.
| Inner Class Summary | |
static interface |
Sorter.Comparable
This is an alternative interface that can be used to order objects. |
static interface |
Sorter.Comparer
This interface defines the compare() method used to compare two objects. |
| Constructor Summary | |
Sorter()
|
|
| Method Summary | |
static void |
sort(java.lang.Object[] a,
int from,
int to,
boolean up,
Sorter.Comparer c)
Sort a portion of an array of objects, using the comparison defined by the Comparer object c. |
static void |
sort(java.lang.Object[] a,
java.lang.Object[] b,
int from,
int to,
boolean up,
Sorter.Comparer c)
This is the main sort() routine. |
static void |
sort(java.lang.Object[] a,
Sorter.Comparer c)
Sort an array of arbitrary objects into ascending order, using the comparison defined by the Comparer object c |
static void |
sort(Sorter.Comparable[] a)
Sort an array of Comparable objects into ascending order |
static void |
sort(Sorter.Comparable[] a,
int from,
int to,
boolean up)
Sort a portion of an array of Comparable objects. |
static void |
sort(Sorter.Comparable[] a,
java.lang.Object[] b,
int from,
int to,
boolean up)
Sort a portion of array a of Comparable objects. |
static void |
sort(java.lang.String[] a)
Sort an array of strings into ascending order, using the correct collation order for the default locale |
static void |
sort(java.lang.String[] a,
int from,
int to,
boolean up,
boolean ignorecase)
Sort a portion of an array of strings, using the collation order of the default locale. |
static void |
sort(java.lang.String[] a,
int from,
int to,
boolean up,
boolean ignorecase,
java.util.Locale locale)
Sort a portion of an array of strings, using the collation order of the specified locale. |
static void |
sortAscii(java.lang.String[] a)
Sort an array of ASCII strings into ascending order |
static void |
sortAscii(java.lang.String[] a,
int from,
int to,
boolean up)
Sort a portion of an array of ASCII strings into ascending or descending order, depending on the argument up |
static void |
sortAsciiIgnoreCase(java.lang.String[] a)
Sort an array of ASCII strings into ascending order, ignoring case |
static void |
sortAsciiIgnoreCase(java.lang.String[] a,
int from,
int to,
boolean up)
Sort an portion of an array of ASCII strings, ignoring case. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public Sorter()
| Method Detail |
public static void sort(java.lang.String[] a)
public static void sort(Sorter.Comparable[] a)
public static void sort(java.lang.Object[] a,
Sorter.Comparer c)
public static void sort(Sorter.Comparable[] a,
int from,
int to,
boolean up)
public static void sort(Sorter.Comparable[] a,
java.lang.Object[] b,
int from,
int to,
boolean up)
public static void sort(java.lang.Object[] a,
int from,
int to,
boolean up,
Sorter.Comparer c)
public static void sort(java.lang.String[] a,
int from,
int to,
boolean up,
boolean ignorecase)
public static void sort(java.lang.Object[] a,
java.lang.Object[] b,
int from,
int to,
boolean up,
Sorter.Comparer c)
public static void sort(java.lang.String[] a,
int from,
int to,
boolean up,
boolean ignorecase,
java.util.Locale locale)
public static void sortAscii(java.lang.String[] a)
public static void sortAscii(java.lang.String[] a,
int from,
int to,
boolean up)
public static void sortAsciiIgnoreCase(java.lang.String[] a)
public static void sortAsciiIgnoreCase(java.lang.String[] a,
int from,
int to,
boolean up)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||