All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class jclass.util.JCqsort

java.lang.Object
   |
   +----jclass.util.JCqsort

public class JCqsort
extends Object
Sorts in descending or ascending order, using string or numeric comparison as applicable.


Variable Index

 o ASCENDING
 o DESCENDING

Constructor Index

 o JCqsort(Vector, JCSortInterface)
Constructs the JCqsort object.

Method Index

 o getDirection()
Gets the current sorting direction
 o gt(Object, Object, JCSortInterface)
Returns true if o1 > o2, using String, Number or Date comparisons as appropriate.
 o lt(Object, Object, JCSortInterface)
Returns true if o1 < o2, using String, Number or Date comparisons as appropriate.
 o sort(int)
Initate ascending sort.
 o sort(int, int)
Initates sort.

Variables

 o ASCENDING
 public static final int ASCENDING
 o DESCENDING
 public static final int DESCENDING

Constructors

 o JCqsort
 public JCqsort(Vector base,
                JCSortInterface sort_if)
Constructs the JCqsort object.

Parameters:
base - Vector of vectors representing table data
sort_if - object implementing the sort interface; if non-null, it is called during sorting

Methods

 o gt
 public static boolean gt(Object o1,
                          Object o2,
                          JCSortInterface sort_if)
Returns true if o1 > o2, using String, Number or Date comparisons as appropriate.

Parameters:
sort_if - Called if not null, and neither object is null
 o lt
 public static boolean lt(Object o1,
                          Object o2,
                          JCSortInterface sort_if)
Returns true if o1 < o2, using String, Number or Date comparisons as appropriate.

Parameters:
sort_if - Called if not null, and neither object is null
 o sort
 public int[] sort(int column)
Initate ascending sort.

Returns:
the new sorted order (element i's value is moved to row i)
 o getDirection
 public int getDirection()
Gets the current sorting direction

See Also:
sort
 o sort
 public int[] sort(int column,
                   int direction)
Initates sort.

Parameters:
direction - ASCENDING or DESCENDING
Returns:
the new sorted order (element i's value is moved to row i)

All Packages  Class Hierarchy  This Package  Previous  Next  Index