|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.mckoi.util.SortUtil
public final class SortUtil
Provides various sort utilities for a list of objects that implement Comparable. It also provide some methods that can be used on a sorted list of objects, such as a fast search method.
All the methods in this class are static.
Constructor Summary | |
---|---|
SortUtil()
|
Method Summary | |
---|---|
static void |
quickSort(java.lang.Comparable[] obs)
Performs a quick sort on the given array of Comparable objects. |
static void |
quickSort(java.lang.Comparable[] list,
int min,
int max)
Performs a quick sort on the given array of Comparable objects between the min and maximum range. |
static int |
sortedIndexOf(java.lang.Comparable[] list,
java.lang.Comparable val,
int lower,
int higher)
Quickly finds the index of the given object in the list. |
static SearchResults |
sortedQuickFind(java.lang.Comparable[] list,
java.lang.Comparable val,
SearchResults results)
Quickly finds the given element in the array of objects. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SortUtil()
Method Detail |
---|
public static void quickSort(java.lang.Comparable[] list, int min, int max)
public static void quickSort(java.lang.Comparable[] obs)
public static int sortedIndexOf(java.lang.Comparable[] list, java.lang.Comparable val, int lower, int higher)
public static SearchResults sortedQuickFind(java.lang.Comparable[] list, java.lang.Comparable val, SearchResults results)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |