com.espertech.esper.util
Class MultiKeyCollatingComparator

java.lang.Object
  extended by com.espertech.esper.util.MultiKeyCollatingComparator
All Implemented Interfaces:
MetaDefItem, java.io.Serializable, java.util.Comparator<MultiKeyUntyped>

public final class MultiKeyCollatingComparator
extends java.lang.Object
implements java.util.Comparator<MultiKeyUntyped>, MetaDefItem, java.io.Serializable

A comparator on multikeys with string values and using the Collator for comparing. The multikeys must contain the same number of values.

See Also:
Serialized Form

Constructor Summary
MultiKeyCollatingComparator(boolean[] isDescendingValues, boolean[] stringTypeValues)
          Ctor.
 
Method Summary
 int compare(MultiKeyUntyped firstValues, MultiKeyUntyped 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

MultiKeyCollatingComparator

public MultiKeyCollatingComparator(boolean[] isDescendingValues,
                                   boolean[] stringTypeValues)
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.
stringTypeValues - true for each string-typed column
Method Detail

compare

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

© 2006-2015 EsperTech Inc.
All rights reserved.
Visit us at espertech.com