public class ValueComparator<T extends Value & Comparable<T>> extends TypeComparator<T>
| Constructor and Description |
|---|
ValueComparator(boolean ascending,
Class<T> type) |
| Modifier and Type | Method and Description |
|---|---|
int |
compare(T first,
T second) |
int |
compareSerialized(DataInputView firstSource,
DataInputView secondSource) |
int |
compareToReference(TypeComparator<T> referencedComparator) |
TypeComparator<T> |
duplicate() |
boolean |
equalToReference(T candidate) |
int |
extractKeys(Object record,
Object[] target,
int index) |
TypeComparator[] |
getFlatComparators() |
int |
getNormalizeKeyLen() |
int |
hash(T record) |
boolean |
invertNormalizedKey() |
boolean |
isNormalizedKeyPrefixOnly(int keyBytes) |
void |
putNormalizedKey(T record,
MemorySegment target,
int offset,
int numBytes) |
T |
readWithKeyDenormalization(T reuse,
DataInputView source) |
void |
setReference(T toCompare) |
boolean |
supportsNormalizedKey() |
boolean |
supportsSerializationWithKeyNormalization() |
void |
writeWithKeyNormalization(T record,
DataOutputView target) |
compareAgainstReference, supportsCompareAgainstReferencepublic int hash(T record)
hash in class TypeComparator<T extends Value & Comparable<T>>public void setReference(T toCompare)
setReference in class TypeComparator<T extends Value & Comparable<T>>public boolean equalToReference(T candidate)
equalToReference in class TypeComparator<T extends Value & Comparable<T>>public int compareToReference(TypeComparator<T> referencedComparator)
compareToReference in class TypeComparator<T extends Value & Comparable<T>>public int compare(T first, T second)
compare in class TypeComparator<T extends Value & Comparable<T>>public int compareSerialized(DataInputView firstSource, DataInputView secondSource) throws IOException
compareSerialized in class TypeComparator<T extends Value & Comparable<T>>IOExceptionpublic boolean supportsNormalizedKey()
supportsNormalizedKey in class TypeComparator<T extends Value & Comparable<T>>public int getNormalizeKeyLen()
getNormalizeKeyLen in class TypeComparator<T extends Value & Comparable<T>>public boolean isNormalizedKeyPrefixOnly(int keyBytes)
isNormalizedKeyPrefixOnly in class TypeComparator<T extends Value & Comparable<T>>public void putNormalizedKey(T record, MemorySegment target, int offset, int numBytes)
putNormalizedKey in class TypeComparator<T extends Value & Comparable<T>>public boolean invertNormalizedKey()
invertNormalizedKey in class TypeComparator<T extends Value & Comparable<T>>public TypeComparator<T> duplicate()
duplicate in class TypeComparator<T extends Value & Comparable<T>>public int extractKeys(Object record, Object[] target, int index)
extractKeys in class TypeComparator<T extends Value & Comparable<T>>public TypeComparator[] getFlatComparators()
getFlatComparators in class TypeComparator<T extends Value & Comparable<T>>public boolean supportsSerializationWithKeyNormalization()
supportsSerializationWithKeyNormalization in class TypeComparator<T extends Value & Comparable<T>>public void writeWithKeyNormalization(T record, DataOutputView target) throws IOException
writeWithKeyNormalization in class TypeComparator<T extends Value & Comparable<T>>IOExceptionpublic T readWithKeyDenormalization(T reuse, DataInputView source) throws IOException
readWithKeyDenormalization in class TypeComparator<T extends Value & Comparable<T>>IOExceptionCopyright © 2015 The Apache Software Foundation. All rights reserved.