Class NumericConditionConfig
java.lang.Object
com.norconex.importer.handler.BaseLabelableConfig
com.norconex.importer.handler.condition.BaseConditionConfig
com.norconex.importer.handler.condition.impl.NumericConditionConfig
- All Implemented Interfaces:
Labelable
A condition based on the numeric value(s) of matching
metadata fields, supporting decimals. If multiple values are found for a
field, only one of them needs to match for this condition to be true.
If the value is not a valid number, it is considered not to be matching
(i.e., false).
The decimal character is expected to be a dot (".").
The default operator is "eq" (equals).
Single number vs range of numbers:
This condition accepts zero, one, or two value matchers:
- 0: Use no value matcher to simply evaluate whether the value is a number (including decimal support).
- 1: Use one value matcher to evaluate if the value is lower/greater and/or the same as the specified number.
-
2: Use two value matchers to define a numeric range to evaluate
(both matches have to evaluate to
true).
Operator- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanbooleanGets the text matcher of field names.inthashCode()setFieldMatcher(TextMatcher fieldMatcher) Sets the text matcher of field names.setValueMatcher(NumericValueMatcher firstValueMatcher) setValueMatcherRangeEnd(NumericValueMatcher secondValueMatcher) toString()Methods inherited from class com.norconex.importer.handler.BaseLabelableConfig
getLabel, setLabel
-
Constructor Details
-
NumericConditionConfig
public NumericConditionConfig()
-
-
Method Details
-
getFieldMatcher
Gets the text matcher of field names.- Returns:
- field matcher
-
setFieldMatcher
Sets the text matcher of field names. Copies it.- Parameters:
fieldMatcher- text matcher- Returns:
- this instance
-
getValueMatcher
-
setValueMatcher
-
getValueMatcherRangeEnd
-
setValueMatcherRangeEnd
-
equals
- Overrides:
equalsin classBaseLabelableConfig
-
canEqual
- Overrides:
canEqualin classBaseLabelableConfig
-
hashCode
public int hashCode()- Overrides:
hashCodein classBaseLabelableConfig
-
toString
- Overrides:
toStringin classBaseLabelableConfig
-