public class FSIndexComparatorImpl extends Object implements FSIndexComparator
FEATURE_KEY, REVERSE_STANDARD_COMPARE, STANDARD_COMPARE, TYPE_ORDER_KEY
Constructor and Description |
---|
FSIndexComparatorImpl(CASImpl cas) |
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.
|
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) |
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 FSIndexComparatorImpl(CASImpl cas)
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
public int getKeyType(int key)
getKeyType
in interface FSIndexComparator
public int getNumberOfKeys()
FSIndexComparator
getNumberOfKeys
in interface FSIndexComparator
public Feature 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)
FSIndexComparator
FSIndexComparator
true
iff the
comparators have the same keys and comparators.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 int compareTo(FSIndexComparator o)
compareTo
in interface Comparable<FSIndexComparator>
Comparable.compareTo(Object)
Copyright © 2006–2021 The Apache Software Foundation. All rights reserved.