xacute.quilt
Class MyCompare

java.lang.Object
  |
  +--xacute.quilt.MyCompare
All Implemented Interfaces:
java.util.Comparator

public class MyCompare
extends java.lang.Object
implements java.util.Comparator

An implementation of class java.util.Comparator that handles multi-key sort. Every key is a String[]. Key are sorted in order ([0],[1], etc.), according to sortOrders. true means ascending order. false descending. When creating an instance, the boolean are converted into integers (+1 for ascending, -1 for descending).


Constructor Summary
MyCompare(SortClause[] sortOrders)
           
 
Method Summary
 int compare(java.lang.Object o1, java.lang.Object o2)
           
 boolean equals(java.lang.Object o1, java.lang.Object o2)
           
 
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

MyCompare

public MyCompare(SortClause[] sortOrders)
Method Detail

compare

public int compare(java.lang.Object o1,
                   java.lang.Object o2)
Specified by:
compare in interface java.util.Comparator

equals

public boolean equals(java.lang.Object o1,
                      java.lang.Object o2)