net.esper.util
Class MultiKeyComparator

java.lang.Object
  extended by net.esper.util.MultiKeyComparator
All Implemented Interfaces:
java.util.Comparator<MultiKey>

public final class MultiKeyComparator
extends java.lang.Object
implements java.util.Comparator<MultiKey>

A comparator on multikeys. The multikeys must contain the same number of values.


Constructor Summary
MultiKeyComparator(java.lang.Boolean[] isDescendingValues)
          Ctor.
 
Method Summary
 int compare(MultiKey firstValues, MultiKey secondValues)
           
 
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

MultiKeyComparator

public MultiKeyComparator(java.lang.Boolean[] isDescendingValues)
Ctor.

Parameters:
isDescendingValues - - each value is true if the corresponding (same index) entry in the multi-keys is to be sorted in descending order. The multikeys to be compared must have the same number of values as this array.
Method Detail

compare

public final int compare(MultiKey firstValues,
                         MultiKey secondValues)
Specified by:
compare in interface java.util.Comparator<MultiKey>