public static class Comparisons.TextComparison extends Object implements Comparisons.Comparison
Constructor and Description |
---|
TextComparison(Comparisons.Type type,
List<String> tokens,
String tokenizerName,
String fallbackTokenizerName) |
TextComparison(Comparisons.Type type,
String tokens,
String tokenizerName,
String fallbackTokenizerName) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
Boolean |
eval(FDBRecordStoreBase<?> store,
EvaluationContext context,
Object value)
Evaluate this comparison for the value taken from the target record.
|
Object |
getComparand(FDBRecordStoreBase<?> store,
EvaluationContext context)
Get the comparison value from the evaluation context.
|
String |
getFallbackTokenizerName() |
String |
getTokenizerName() |
Comparisons.Type |
getType()
Get the comparison type.
|
int |
hashCode() |
int |
planHash()
Return a hash similar to
hashCode , but with the additional guarantee that is is stable across JVMs. |
String |
toString() |
String |
typelessString()
Get the printed representation of the comparison less the comparison operator itself.
|
void |
validate(Descriptors.FieldDescriptor descriptor,
boolean fannedOut)
Validate that this comparison is compatible with a given record field.
|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getComparand
combineHashes, iterablePlanHash, objectPlanHash, objectsPlanHash, planHash, planHash, planHashUnordered, stringHashUnordered
public TextComparison(@Nonnull Comparisons.Type type, @Nonnull String tokens, @Nullable String tokenizerName, @Nonnull String fallbackTokenizerName)
@Nullable public Boolean eval(@Nonnull FDBRecordStoreBase<?> store, @Nonnull EvaluationContext context, @Nullable Object value)
Comparisons.Comparison
eval
in interface Comparisons.Comparison
store
- the record store for the querycontext
- the evaluation context for getting the other comparison valuevalue
- the value taken from the recordpublic void validate(@Nonnull Descriptors.FieldDescriptor descriptor, boolean fannedOut)
Comparisons.Comparison
validate
in interface Comparisons.Comparison
descriptor
- the Protobuf descriptor for the proposed comparison fieldfannedOut
- whether a repeated field fans out into multiple comparisons or is treated as a single list value@Nonnull public Comparisons.Type getType()
Comparisons.Comparison
getType
in interface Comparisons.Comparison
@Nullable public Object getComparand(@Nullable FDBRecordStoreBase<?> store, @Nullable EvaluationContext context)
Comparisons.Comparison
getComparand
in interface Comparisons.Comparison
store
- the record store for the querycontext
- the context for query evaluation@Nonnull public String typelessString()
Comparisons.Comparison
typelessString
in interface Comparisons.Comparison
public int planHash()
PlanHashable
hashCode
, but with the additional guarantee that is is stable across JVMs.planHash
in interface PlanHashable