com.jaxfront.core.util.sort
Class FastQSort

java.lang.Object
  extended by com.jaxfront.core.util.sort.FastQSort

public class FastQSort
extends java.lang.Object

A quick sort demonstration algorithm SortAlgorithm.java

Version:
@(#)QSortAlgorithm.java 1.3, 29 Feb 1996 extended with TriMedian and InsertionSort by Denis Ahrens with all the tips from Robert Sedgewick (Algorithms in C++). It uses TriMedian and InsertionSort for lists shorts than 4.
Author:
James Gosling, Kevin A. Smith

Field Summary
static int ASC
           
static int DES
           
static int NATURAL
           
 
Constructor Summary
FastQSort()
           
 
Method Summary
static java.util.Comparator getNumberCompare()
           
static java.util.Comparator getStringCaseInsensitiveComparator()
           
static java.util.Comparator getStringComparator()
           
static java.util.Comparator getTypeComparator()
           
static void main(java.lang.String[] args)
           
 int[] sort(java.util.List a, java.util.Comparator comparator)
           
 int[] sort(java.util.List a, java.util.Comparator comparator, int direction)
           
 int[] sort(java.util.List a, int[] indexList, java.util.Comparator comparator)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ASC

public static final int ASC
See Also:
Constant Field Values

DES

public static final int DES
See Also:
Constant Field Values

NATURAL

public static final int NATURAL
See Also:
Constant Field Values
Constructor Detail

FastQSort

public FastQSort()
Method Detail

sort

public int[] sort(java.util.List a,
                  java.util.Comparator comparator)
           throws java.lang.Exception
Throws:
java.lang.Exception

sort

public int[] sort(java.util.List a,
                  java.util.Comparator comparator,
                  int direction)
           throws java.lang.Exception
Throws:
java.lang.Exception

sort

public int[] sort(java.util.List a,
                  int[] indexList,
                  java.util.Comparator comparator)
           throws java.lang.Exception
Throws:
java.lang.Exception

main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception
Throws:
java.lang.Exception

getStringComparator

public static java.util.Comparator getStringComparator()

getStringCaseInsensitiveComparator

public static java.util.Comparator getStringCaseInsensitiveComparator()

getTypeComparator

public static java.util.Comparator getTypeComparator()

getNumberCompare

public static java.util.Comparator getNumberCompare()