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)
FSIndexComparatorsetType in interface FSIndexComparatortype - The type of the index.public Type getType()
FSIndexComparatorgetType in interface FSIndexComparatorpublic int addKey(Feature feat, int compareKey)
FSIndexComparatoraddKey in interface FSIndexComparatorfeat - The key feature.compareKey - The way to compare the key values.public int addKey(LinearTypeOrder typeOrder, int compareKey)
addKey in interface FSIndexComparatorpublic int getKeyType(int key)
getKeyType in interface FSIndexComparatorpublic int getNumberOfKeys()
FSIndexComparatorgetNumberOfKeys in interface FSIndexComparatorpublic Feature getKeyFeature(int key)
FSIndexComparatorgetKeyFeature in interface FSIndexComparatorkey - The number of the key.null, else.public LinearTypeOrder getKeyTypeOrder(int key)
public int getKeyComparator(int key)
FSIndexComparatorgetKeyComparator in interface FSIndexComparatorkey - The number of the key.-1, else.public boolean equals(Object o)
FSIndexComparatorFSIndexComparator
true iff the
comparators have the same keys and comparators.equals in interface FSIndexComparatorequals in class Objectpublic boolean isValid()
FSIndexComparatorisValid in interface FSIndexComparatortrue 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.