@Internal public final class BigIntComparator extends BasicTypeComparator<BigInteger>
ascendingComparison| Constructor and Description |
|---|
BigIntComparator(boolean ascending) |
| Modifier and Type | Method and Description |
|---|---|
int |
compareSerialized(DataInputView firstSource,
DataInputView secondSource)
Compares two records in serialized form.
|
BigIntComparator |
duplicate()
Creates a copy of this class.
|
int |
getNormalizeKeyLen()
Gets the number of bytes that the normalized key would maximally take.
|
boolean |
isNormalizedKeyPrefixOnly(int keyBytes)
Checks, whether the given number of bytes for a normalized is only a prefix to determine the order of elements
of the data type for which this comparator provides the comparison methods.
|
void |
putNormalizedKey(BigInteger record,
MemorySegment target,
int offset,
int len)
Adds a normalized key containing the normalized number of bits and MSBs of the given record.
|
boolean |
supportsNormalizedKey()
Checks whether the data type supports the creation of a normalized key for comparison.
|
boolean |
supportsSerializationWithKeyNormalization()
Check whether this comparator supports to serialize the record in a format that replaces its keys by a normalized
key.
|
compare, compareToReference, equalToReference, extractKeys, getFlatComparators, hash, invertNormalizedKey, readWithKeyDenormalization, setReference, writeWithKeyNormalizationcompareAgainstReference, supportsCompareAgainstReferencepublic int compareSerialized(DataInputView firstSource, DataInputView secondSource) throws IOException
TypeComparatorComparator.compare(Object, Object).
This method may de-serialize the records or compare them directly based on their binary representation.
compareSerialized in class TypeComparator<BigInteger>firstSource - The input view containing the first record.secondSource - The input view containing the second record.Comparator.compare(Object, Object).IOException - Thrown, if any of the input views raised an exception when reading the records.Comparator.compare(Object, Object)public boolean supportsNormalizedKey()
TypeComparatorsupportsNormalizedKey in class TypeComparator<BigInteger>public boolean supportsSerializationWithKeyNormalization()
TypeComparatorsupportsSerializationWithKeyNormalization in class BasicTypeComparator<BigInteger>public int getNormalizeKeyLen()
TypeComparatorInteger.MAX_VALUE is interpreted as infinite.getNormalizeKeyLen in class TypeComparator<BigInteger>public boolean isNormalizedKeyPrefixOnly(int keyBytes)
TypeComparatorisNormalizedKeyPrefixOnly in class TypeComparator<BigInteger>public void putNormalizedKey(BigInteger record, MemorySegment target, int offset, int len)
putNormalizedKey in class TypeComparator<BigInteger>record - The record for which to create the normalized key.target - The byte array into which to write the normalized key bytes.offset - The offset in the byte array, where to start writing the normalized key bytes.len - The number of bytes to be written exactly.NormalizableKey.copyNormalizedKey(MemorySegment, int, int)public BigIntComparator duplicate()
TypeComparatorduplicate in class TypeComparator<BigInteger>Copyright © 2014–2018 The Apache Software Foundation. All rights reserved.