util
Class Sorter
java.lang.Object
util.Sorter
public class Sorter
- extends Object
Class to sort Sortable Objects. Defines two static methods:
ascending(Sortable[]), descending(Sortable[]). Sorting algorithm is a heap
sort (Num. Rec. 8.3).
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Sorter
public Sorter()
ascending
public static Sortable[] ascending(Sortable[] sort)
- Parameters:
sort -
- Returns:
- Sortable
descending
public static Sortable[] descending(Sortable[] sort)
- Parameters:
sort -
- Returns:
- Sortable
sort
public static Sortable[] sort(Sortable[] data,
boolean toggle)
- Parameters:
data - toggle -
- Returns:
- Sortable