java.lang.Object
com.pervasive.datarush.encoding.text.TruthValues
- Direct Known Subclasses:
ExactTruthMapping,InsensitiveTruthMapping
A mapping between boolean values and strings.
Any number of strings may be mapped to a boolean value,
but each boolean value must have a single canonical string
representation.
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedTruthValues(String truth, String falsity) Defines a new mapping, specifying the canonical representations oftrueandfalse. -
Method Summary
Modifier and TypeMethodDescriptionGets the string value forfalse.abstract booleanIndicates whether the given string is a representation forfalse.abstract booleanIndicates whether the given string is a representation fortrue.Gets the string value fortrue.
-
Field Details
-
truth
Text representing a value oftrue. -
falsity
Text representing a value offalse.
-
-
Constructor Details
-
TruthValues
Defines a new mapping, specifying the canonical representations oftrueandfalse.- Parameters:
truth- the canonical string representation oftrue.falsity- the canonical string representation offalse.
-
-
Method Details
-
falseValue
Gets the string value forfalse.- Returns:
- the canonical string representation of
false.
-
trueValue
Gets the string value fortrue.- Returns:
- the canonical string representation of
true.
-
isTrue
Indicates whether the given string is a representation fortrue.- Parameters:
text- the string to check- Returns:
trueif the string represents truth
-
isFalse
Indicates whether the given string is a representation forfalse.- Parameters:
text- the string to check- Returns:
trueif the string represents falsity
-