Packages
 In this topic

*Methods

 

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

 


Class VectorSort

public class VectorSort extends Sort
{
  // Methods
  protected int compare(int p, int q);
  static public void sort(Vector vector, Comparison comparison);
  static public void sort(Vector vector, Comparison comparison, int
        first, int size);
  protected void swap(int p, int q);
}

This class sorts the specified Vector object using the specified Comparison.

Sort
  |
  +--VectorSort

Methods

compare

protected int compare(int p, int q);

Compares two elements in the vector 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(Vector vector, Comparison comparison);

Sorts the specified Vector object using the specified Comparison object.

Return Value:

No return value.

ParameterDescription
vector The Vector object to be sorted.
comparison The Comparison object to use.

sort

static public void sort(Vector vector, Comparison comparison, int first,
        int size);

Sorts a subrange of the specified Vector object using the specified Comparison object.

Return Value:

No return value.

ParameterDescription
vector The Vector object to be sorted.
comparison The Comparison object to use.
first The index of the beginning element of the subrange to sort.
size The number of elements of the subrange to sort.

swap

protected void swap(int p, int q);

Swaps two elements in the vector.

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.