public class FSIndexComparatorImpl extends Object implements FSIndexComparator
FEATURE_KEY, REVERSE_STANDARD_COMPARE, STANDARD_COMPARE, TYPE_ORDER_KEY
Constructor and Description |
---|
FSIndexComparatorImpl() |
Modifier and Type | Method and Description |
---|---|
int |
addKey(Feature feat,
int compareKey)
Add a new key.
|
int |
addKey(LinearTypeOrder typeOrder,
int compareKey) |
int |
compareTo(FSIndexComparator o)
Compares two FSIndexComparator instances.
|
FSIndexComparatorImpl |
copy() |
boolean |
equals(Object o)
Equals including the type of the comparator
|
int |
getKeyComparator(int key)
Get the comparator for this key.
|
FeatureImpl |
getKeyFeature(int key)
Get the feature for this key.
|
int |
getKeyType(int key) |
LinearTypeOrder |
getKeyTypeOrder(int key) |
int |
getNumberOfKeys()
Return the number of keys.
|
Type |
getType()
Get the type of this comparator.
|
int |
hashCode() |
boolean |
isValid()
Validate that this comparator is valid with respect to the type system.
|
void |
setType(Type type)
Set the type of this comparator.
|
public void setType(Type type)
FSIndexComparator
setType
in interface FSIndexComparator
type
- The type of the index.public Type getType()
FSIndexComparator
getType
in interface FSIndexComparator
public int addKey(Feature feat, int compareKey)
FSIndexComparator
addKey
in interface FSIndexComparator
feat
- The key feature.compareKey
- The way to compare the key values.public int addKey(LinearTypeOrder typeOrder, int compareKey)
addKey
in interface FSIndexComparator
typeOrder
- the type ordercompareKey
- the directionpublic int getKeyType(int key)
getKeyType
in interface FSIndexComparator
public int getNumberOfKeys()
FSIndexComparator
getNumberOfKeys
in interface FSIndexComparator
public FeatureImpl getKeyFeature(int key)
FSIndexComparator
getKeyFeature
in interface FSIndexComparator
key
- The number of the key.null
, else.public LinearTypeOrder getKeyTypeOrder(int key)
public int getKeyComparator(int key)
FSIndexComparator
getKeyComparator
in interface FSIndexComparator
key
- The number of the key.-1
, else.public boolean equals(Object o)
equals
in interface FSIndexComparator
equals
in class Object
public boolean isValid()
FSIndexComparator
isValid
in interface FSIndexComparator
true
iff all key features are appropriate for the type of this
comparator.public FSIndexComparatorImpl copy()
public int compareTo(FSIndexComparator o)
compareTo
in interface Comparable<FSIndexComparator>
Comparable.compareTo(Object)
Copyright © 2006–2021 The Apache Software Foundation. All rights reserved.