public class CompositeVectorComparator extends VectorValueComparator<ValueVector>
It works by first using the first comparator, if a non-zero value is returned, it simply returns it. Otherwise, it uses the second comparator, and so on, until a non-zero value is produced, or all inner comparators have been used.
valueWidth, vector1, vector2| Constructor and Description |
|---|
CompositeVectorComparator(VectorValueComparator[] innerComparators) |
| Modifier and Type | Method and Description |
|---|---|
int |
compare(int index1,
int index2)
Compare two values, given their indices.
|
int |
compareNotNull(int index1,
int index2)
Compare two values, given their indices.
|
VectorValueComparator<ValueVector> |
createNew()
Creates a comparator of the same type.
|
attachVector, attachVectors, getValueWidthpublic CompositeVectorComparator(VectorValueComparator[] innerComparators)
public int compareNotNull(int index1,
int index2)
VectorValueComparatorcompareNotNull in class VectorValueComparator<ValueVector>index1 - index of the first value to compare.index2 - index of the second value to compare.public int compare(int index1,
int index2)
VectorValueComparatorcompare in class VectorValueComparator<ValueVector>index1 - index of the first value to compare.index2 - index of the second value to compare.public VectorValueComparator<ValueVector> createNew()
VectorValueComparatorcreateNew in class VectorValueComparator<ValueVector>Copyright © 2022 The Apache Software Foundation. All rights reserved.