public final class HashableMultiKeyComparator extends java.lang.Object implements java.util.Comparator<HashableMultiKey>, MetaDefItem, java.io.Serializable
Constructor and Description |
---|
HashableMultiKeyComparator(boolean[] isDescendingValues)
Ctor.
|
Modifier and Type | Method and Description |
---|---|
int |
compare(HashableMultiKey firstValues,
HashableMultiKey secondValues) |
protected static int |
compareValues(java.lang.Object valueOne,
java.lang.Object valueTwo,
boolean isDescending)
Compares two nullable values.
|
public HashableMultiKeyComparator(boolean[] isDescendingValues)
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.public final int compare(HashableMultiKey firstValues, HashableMultiKey secondValues)
compare
in interface java.util.Comparator<HashableMultiKey>
protected static int compareValues(java.lang.Object valueOne, java.lang.Object valueTwo, boolean isDescending)
valueOne
- first value to comparevalueTwo
- second value to compareisDescending
- true for descending