org.ujac.util.table
Class RowComparator
java.lang.Object
org.ujac.util.table.RowComparator
- All Implemented Interfaces:
- Comparator
public class RowComparator
- extends Object
- implements Comparator
Name: RowComparator
Description: Class which compares two rows according to the given compare items.
- Author:
- lauerc
Constructor Summary |
RowComparator(CompareItem[] compareColumns)
Constructs a RowComparator instance with specific attributes. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RowComparator
public RowComparator(CompareItem[] compareColumns)
- Constructs a RowComparator instance with specific attributes.
- Parameters:
compareColumns
- The column definition for the sort process.
compare
public int compare(Object a,
Object b)
throws ClassCastException
- Compares its two arguments for order. Returns a negative integer,
zero, or a positive integer as the first argument is less than, equal
to, or greater than the second.
- Specified by:
compare
in interface Comparator
- Parameters:
a
- the first object to be compared.b
- the second object to be compared.
- Returns:
- a negative integer, zero, or a positive integer as the
first argument is less than, equal to, or greater than the
second.
- Throws:
ClassCastException
- if the arguments' types prevent them from
being compared by this Comparator.
Copyright © 2003-2004 UJAC.org. All Rights Reserved.