NetCharts Pro

netcharts.util
Class NFSort

netcharts.util.NFSort

public class NFSort

This class supports the sorting of vectors containing arbitrary object types.


Constructor Summary
NFSort()
           
 
Method Summary
 int compare(java.lang.Object d1, java.lang.Object d2)
          Generic comparison method that compares any objects as strings.
static void main(java.lang.String[] args)
           
static void qsort(java.lang.String[] list)
          Sort the given String array using QuickSort
static void qsort(java.util.Vector v)
          Sort the given vector using QuickSort and a generic string comparison method.
static void qsort(java.util.Vector v, int left, int right)
          Sort the given vector using the QuickSort approach and a generic string comparsion method.
static void qsort(java.util.Vector v, int left, int right, netcharts.util.NFCompare cmp)
          Sort the given vector using the QuickSort approach, and the given comparison object.
static void qsort(java.util.Vector v, netcharts.util.NFCompare cmp)
          Sort the given vector using the QuickSort approach and the given comparison routine
 

Constructor Detail

NFSort

public NFSort()
Method Detail

compare

public int compare(java.lang.Object d1,
                   java.lang.Object d2)
Generic comparison method that compares any objects as strings.
Parameters:
d1 - Object one.
d2 - Object two.
Returns:
0 if equal, -1 if d1 is less than d2, 1 if d1 is greater than d2.

qsort

public static void qsort(java.util.Vector v)
Sort the given vector using QuickSort and a generic string comparison method.
Parameters:
v - The Vector to sort.

qsort

public static void qsort(java.util.Vector v,
                         netcharts.util.NFCompare cmp)
Sort the given vector using the QuickSort approach and the given comparison routine
Parameters:
v - The Vector to sort.
cmp - The NFCompare object to use for comparisons.

qsort

public static void qsort(java.util.Vector v,
                         int left,
                         int right)
Sort the given vector using the QuickSort approach and a generic string comparsion method. The left and right parameters specify the range of the vector to be sorted.
Parameters:
v - The Vector to sort.
left - The Left pivot.
right - The Right pivot.

qsort

public static void qsort(java.util.Vector v,
                         int left,
                         int right,
                         netcharts.util.NFCompare cmp)
Sort the given vector using the QuickSort approach, and the given comparison object. The left and right parameters specify the range of the vector to be sorted.
Parameters:
v - The Vector to sort.
left - The Left pivot.
right - The Right pivot.
cmp - The NFCompare object to use for comparisons.

qsort

public static void qsort(java.lang.String[] list)
Sort the given String array using QuickSort
Parameters:
list - The list to sort.

main

public static void main(java.lang.String[] args)

NetCharts Pro


Visual Mining, Inc.
15825 Shady Grove Rd.
Suite 20
Rockville, MD 20850
800.308.0731
301.947.8293 FAX

Copyright © Visual Mining, Inc. 1996 - 2004
All Rights Reserved.

NetCharts Pro TM is a registered trademark of Visual Mining, Inc. Other brands and their products are trademarks of their respective holders.

Last Modified: Apr 1, 2004