public interface FSIndexComparator extends Comparable<FSIndexComparator>
Modifier and Type | Field and Description |
---|---|
static int |
FEATURE_KEY |
static int |
REVERSE_STANDARD_COMPARE
Compare key1 of fs1 with key2 of fs2 so that the order of fs1 and fs2 is the reverse as that of
key1 and key2 (with respect to the standard order of that key).
|
static int |
STANDARD_COMPARE
Compare key1 of fs1 with key2 of fs2 so that the order of fs1 and fs2 is the same as that of
key1 and key2 in the standard order for that kind of key.
|
static int |
TYPE_ORDER_KEY |
Modifier and Type | Method and Description |
---|---|
int |
addKey(Feature feat,
int compareKey)
Add a new key.
|
int |
addKey(LinearTypeOrder typeOrder,
int compareKey) |
boolean |
equals(Object o)
Test for equality against another
FSIndexComparator
true iff the
comparators have the same keys and comparators. |
int |
getKeyComparator(int key)
Get the comparator for this key.
|
Feature |
getKeyFeature(int key)
Get the feature for this key.
|
int |
getKeyType(int key) |
int |
getNumberOfKeys()
Return the number of keys.
|
Type |
getType()
Get the type of this comparator.
|
boolean |
isValid()
Validate that this comparator is valid with respect to the type system.
|
void |
setType(Type type)
Set the type of this comparator.
|
compareTo
static final int FEATURE_KEY
static final int TYPE_ORDER_KEY
static final int STANDARD_COMPARE
static final int REVERSE_STANDARD_COMPARE
void setType(Type type)
type
- The type of the index.Type getType()
int addKey(Feature feat, int compareKey)
feat
- The key feature.compareKey
- The way to compare the key values.int addKey(LinearTypeOrder typeOrder, int compareKey)
int getNumberOfKeys()
int getKeyType(int key)
Feature getKeyFeature(int key)
key
- The number of the key.null
, else.int getKeyComparator(int key)
key
- The number of the key.-1
, else.boolean equals(Object o)
FSIndexComparator
true
iff the
comparators have the same keys and comparators.boolean isValid()
true
iff all key features are appropriate for the type of this
comparator.Copyright © 2006–2017 The Apache Software Foundation. All rights reserved.