com.icl.saxon.sort
Class MultiKeyComparer

java.lang.Object
  |
  +--com.icl.saxon.sort.Comparer
        |
        +--com.icl.saxon.sort.MultiKeyComparer

public class MultiKeyComparer
extends Comparer

A MultiKeyComparer compares using a composite sort key.


Constructor Summary
MultiKeyComparer(java.util.Vector keys, Context context)
           
 
Method Summary
 int compare(java.lang.Object a, java.lang.Object b)
          Compare two values.
 
Methods inherited from class com.icl.saxon.sort.Comparer
setDataType, setOrder
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MultiKeyComparer

public MultiKeyComparer(java.util.Vector keys,
                        Context context)
                 throws org.xml.sax.SAXException
Method Detail

compare

public int compare(java.lang.Object a,
                   java.lang.Object b)
Compare two values. Each value must be an array containing the NodeInfo itself, followed by a set of String values, one for each sort key. The values are compared pairwise until a pair is found that are unequal
Overrides:
compare in class Comparer
Following copied from class: com.icl.saxon.sort.Comparer
Returns:
<0 if a0 if a>b
Throws:
java.lang.ClassCastException - if the objects are of the wrong type for this Comparer