All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class jp.kyasu.util.Sorter

java.lang.Object
   |
   +----jp.kyasu.util.Sorter

public class Sorter
extends Object
The Sorter class implements the quick sort operation.

Version:
24 Nov 1997
Author:
Kazuki YASUMATSU
See Also:
Comparer, CompareAdapter

Constructor Index

 o Sorter()
Constructs a sorter with a default comparer.
 o Sorter(Comparer)
Constructs a sorter with the specified comparer.

Method Index

 o getComparer()
Returns the comparer of this sorter.
 o quicksort(boolean[], int, int)
Sorts the specified array of boolean values.
 o quicksort(byte[], int, int)
Sorts the specified array of byte values.
 o quicksort(char[], int, int)
Sorts the specified array of char values.
 o quicksort(double[], int, int)
Sorts the specified array of double values.
 o quicksort(float[], int, int)
Sorts the specified array of float values.
 o quicksort(int[], int, int)
Sorts the specified array of int values.
 o quicksort(long[], int, int)
Sorts the specified array of long values.
 o quicksort(Object, int, int)
Sorts the specified array.
 o quicksort(Object[], int, int)
Sorts the specified array of objects.
 o quicksort(short[], int, int)
Sorts the specified array of short values.
 o setComparer(Comparer)
Sets the comparer of this sorter to be the specified comparer.

Constructors

 o Sorter
 public Sorter()
Constructs a sorter with a default comparer.

 o Sorter
 public Sorter(Comparer comparer)
Constructs a sorter with the specified comparer.

Methods

 o getComparer
 public final Comparer getComparer()
Returns the comparer of this sorter.

Returns:
the comparer of this sorter.
 o setComparer
 public final void setComparer(Comparer comparer)
Sets the comparer of this sorter to be the specified comparer.

Parameters:
comparer - a comparer.
 o quicksort
 public final void quicksort(Object array,
                             int i,
                             int j)
Sorts the specified array.

Parameters:
array - the array to be sorted.
i - the beginning index to sort, inclusive.
j - the ending index to sort, inclusive.
See Also:
sort, sort, sort
 o quicksort
 public final void quicksort(Object array[],
                             int i,
                             int j)
Sorts the specified array of objects.

Parameters:
array - the array to be sorted.
i - the beginning index to sort, inclusive.
j - the ending index to sort, inclusive.
 o quicksort
 public final void quicksort(boolean array[],
                             int i,
                             int j)
Sorts the specified array of boolean values.

Parameters:
array - the array to be sorted.
i - the beginning index to sort, inclusive.
j - the ending index to sort, inclusive.
 o quicksort
 public final void quicksort(byte array[],
                             int i,
                             int j)
Sorts the specified array of byte values.

Parameters:
array - the array to be sorted.
i - the beginning index to sort, inclusive.
j - the ending index to sort, inclusive.
 o quicksort
 public final void quicksort(char array[],
                             int i,
                             int j)
Sorts the specified array of char values.

Parameters:
array - the array to be sorted.
i - the beginning index to sort, inclusive.
j - the ending index to sort, inclusive.
 o quicksort
 public final void quicksort(short array[],
                             int i,
                             int j)
Sorts the specified array of short values.

Parameters:
array - the array to be sorted.
i - the beginning index to sort, inclusive.
j - the ending index to sort, inclusive.
 o quicksort
 public final void quicksort(int array[],
                             int i,
                             int j)
Sorts the specified array of int values.

Parameters:
array - the array to be sorted.
i - the beginning index to sort, inclusive.
j - the ending index to sort, inclusive.
 o quicksort
 public final void quicksort(long array[],
                             int i,
                             int j)
Sorts the specified array of long values.

Parameters:
array - the array to be sorted.
i - the beginning index to sort, inclusive.
j - the ending index to sort, inclusive.
 o quicksort
 public final void quicksort(float array[],
                             int i,
                             int j)
Sorts the specified array of float values.

Parameters:
array - the array to be sorted.
i - the beginning index to sort, inclusive.
j - the ending index to sort, inclusive.
 o quicksort
 public final void quicksort(double array[],
                             int i,
                             int j)
Sorts the specified array of double values.

Parameters:
array - the array to be sorted.
i - the beginning index to sort, inclusive.
j - the ending index to sort, inclusive.

All Packages  Class Hierarchy  This Package  Previous  Next  Index