SPT Core API

com.sptci.echo2
Class ListComparator

java.lang.Object
  extended by com.sptci.echo2.ListComparator
All Implemented Interfaces:
Comparator

public class ListComparator
extends Object
implements Comparator

A comparator to use for comparing the list based columns stored in tables.


Constructor Summary
ListComparator()
           
 
Method Summary
 int compare(Object object1, Object object2)
          Compares its two arguments for order.
 
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
 

Constructor Detail

ListComparator

public ListComparator()
Method Detail

compare

public int compare(Object object1,
                   Object object2)
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.

If the specified objects have a getText method, use the result of that for comparison. If not use the toString method.

Specified by:
compare in interface Comparator
Parameters:
object1 - The first object to be compared.
object2 - The second object to be compared.
See Also:
getValue(java.lang.Object)

SPT Core API