java.lang.Object
com.pervasive.datarush.encoding.text.TruthValues
com.pervasive.datarush.encoding.text.InsensitiveTruthMapping
A one-to-one mapping of strings to boolean values which
does case-insensitive comparisons.
-
Field Summary
Fields inherited from class com.pervasive.datarush.encoding.text.TruthValues
falsity, truth -
Constructor Summary
ConstructorsConstructorDescriptionInsensitiveTruthMapping(String truth, String falsity) Creates a new case-insensitive mapping with the given values. -
Method Summary
Modifier and TypeMethodDescriptionGets the string value forfalse.booleanIndicates whether the given string is a representation forfalse.booleanIndicates whether the given string is a representation fortrue.Gets the string value fortrue.
-
Constructor Details
-
InsensitiveTruthMapping
Creates a new case-insensitive mapping with the given values. The case of the canonical string representations is preserved when formatting.- Parameters:
truth- the string representation oftruefalsity- the string representation offalse
-
-
Method Details
-
falseValue
Description copied from class:TruthValuesGets the string value forfalse.- Overrides:
falseValuein classTruthValues- Returns:
- the canonical string representation of
false.
-
trueValue
Description copied from class:TruthValuesGets the string value fortrue.- Overrides:
trueValuein classTruthValues- Returns:
- the canonical string representation of
true.
-
isTrue
Description copied from class:TruthValuesIndicates whether the given string is a representation fortrue.- Specified by:
isTruein classTruthValues- Parameters:
text- the string to check- Returns:
trueif the string represents truth
-
isFalse
Description copied from class:TruthValuesIndicates whether the given string is a representation forfalse.- Specified by:
isFalsein classTruthValues- Parameters:
text- the string to check- Returns:
trueif the string represents falsity
-