Packages
 In this topic

*Methods

 

Packages   PreviousThis PackageNext
Package com.ms.util   Previous This
Package
Next

 


Class ArraySort

public class ArraySort extends Sort
{
  // Methods
  protected int compare(int p, int q);
  static public void sort(Object array[], Comparison comparison);
  static public void sort(Object array[], Comparison comparison,
        int first, int size);
  protected void swap(int p, int q);
}

This class sorts an Object array using a Comparison object.

Sort
  |
  +--ArraySort

Methods

compare

protected int compare(int p, int q);

Compares two elements in the array using the Comparison object.

Return Value:

Returns the result of the comparison.

ParameterDescription
p The index of the first operand of the comparison.
q The index of the second operand of the comparison.

Overrides:

compare(int,int) in Sort.

sort

static public void sort(Object array[], Comparison comparison);

Sorts the specified Object array using a Comparison object.

Return Value:

No return value.

ParameterDescription
array The Object array to sort.
comparison The Comparison object to use.

sort

static public void sort(Object array[], Comparison comparison, int first,
        int size);

Sorts a subrange of the specified Object array using a Comparison object.

Return Value:

No return value.

ParameterDescription
array The Object array to sort.
comparison The Comparison to use.
first The beginning element of the subrange.
size The number of elements in the subrange.

swap

protected void swap(int p, int q);

Swaps two elements in the array.

Return Value:

No return value.

ParameterDescription
p The index of the first operand of the swap operation.
q The index of the second operand of the swap operation.

Overrides:

swap(int,int) in Sort.

upnrm.gif © 1998 Microsoft Corporation. All rights reserved. Terms of use.