JClass DesktopViews 6.3.0 API
Documentation

com.klg.jclass.table
Class TableDataComparator

java.lang.Object
  |
  +--com.klg.jclass.table.TableDataComparator
All Implemented Interfaces:
Comparator

public class TableDataComparator
extends Object
implements Comparator

Defines a class that performs comparisons based on object type for objects that support the Comparatable interface. Any other object is sorted based on it's toString() value.


Field Summary
static int EQUAL
          Indicates that the first object is equal to the second object.
static int GREATER_THAN
          Indicates that the first objet is greater than the second object.
static int LESS_THAN
          Indicates that the first object is less than the second object.
 
Constructor Summary
TableDataComparator()
           
 
Method Summary
 int compare(Object a, Object b)
          A method that compares object a to object b
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Comparator
equals
 

Field Detail

LESS_THAN

public static final int LESS_THAN
Indicates that the first object is less than the second object.

See Also:
Constant Field Values

EQUAL

public static final int EQUAL
Indicates that the first object is equal to the second object.

See Also:
Constant Field Values

GREATER_THAN

public static final int GREATER_THAN
Indicates that the first objet is greater than the second object.

See Also:
Constant Field Values
Constructor Detail

TableDataComparator

public TableDataComparator()
Method Detail

compare

public int compare(Object a,
                   Object b)
A method that compares object a to object b

Specified by:
compare in interface Comparator
Parameters:
a - The first object
b - The second object
Returns:
1 if a > b, 0 if a == b, -1 if a < b

Copyright © 2004 Quest Software Inc..
All rights reserved.