public class VectorRangeSearcher extends Object
Modifier and Type | Field and Description |
---|---|
static int |
SEARCH_FAIL_RESULT
Result returned when a search fails.
|
Constructor and Description |
---|
VectorRangeSearcher() |
Modifier and Type | Method and Description |
---|---|
static <V extends ValueVector> |
getFirstMatch(V targetVector,
VectorValueComparator<V> comparator,
V keyVector,
int keyIndex)
Search for the first occurrence of an element.
|
static <V extends ValueVector> |
getLastMatch(V targetVector,
VectorValueComparator<V> comparator,
V keyVector,
int keyIndex)
Search for the last occurrence of an element.
|
public static final int SEARCH_FAIL_RESULT
public static <V extends ValueVector> int getFirstMatch(V targetVector, VectorValueComparator<V> comparator, V keyVector, int keyIndex)
V
- the vector type.targetVector
- the vector from which to perform the search.comparator
- the criterion for the comparison.keyVector
- the vector containing the element to search.keyIndex
- the index of the search key in the key vector.public static <V extends ValueVector> int getLastMatch(V targetVector, VectorValueComparator<V> comparator, V keyVector, int keyIndex)
V
- the vector type.targetVector
- the vector from which to perform the search.comparator
- the criterion for the comparison.keyVector
- the vector containing the element to search.keyIndex
- the index of the search key in the key vector.Copyright © 2023 The Apache Software Foundation. All rights reserved.