- java.lang.Object
-
- com.pervasive.datarush.encoding.text.TruthValues
-
- com.pervasive.datarush.encoding.text.ExactTruthMapping
-
public class ExactTruthMapping extends TruthValues
A one-to-one mapping of strings to boolean values which does case-sensitive comparisons.
-
-
Field Summary
-
Fields inherited from class com.pervasive.datarush.encoding.text.TruthValues
falsity, truth
-
-
Constructor Summary
Constructors Constructor Description ExactTruthMapping(String truth, String falsity)
Creates a new case-sensitive mapping with the given values.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
falseValue()
Gets the string value forfalse
.boolean
isFalse(String text)
Indicates whether the given string is a representation forfalse
.boolean
isTrue(String text)
Indicates whether the given string is a representation fortrue
.String
trueValue()
Gets the string value fortrue
.
-
-
-
Method Detail
-
falseValue
public String falseValue()
Description copied from class:TruthValues
Gets the string value forfalse
.- Overrides:
falseValue
in classTruthValues
- Returns:
- the canonical string representation of
false
.
-
trueValue
public String trueValue()
Description copied from class:TruthValues
Gets the string value fortrue
.- Overrides:
trueValue
in classTruthValues
- Returns:
- the canonical string representation of
true
.
-
isTrue
public boolean isTrue(String text)
Description copied from class:TruthValues
Indicates whether the given string is a representation fortrue
.- Specified by:
isTrue
in classTruthValues
- Parameters:
text
- the string to check- Returns:
true
if the string represents truth
-
isFalse
public boolean isFalse(String text)
Description copied from class:TruthValues
Indicates whether the given string is a representation forfalse
.- Specified by:
isFalse
in classTruthValues
- Parameters:
text
- the string to check- Returns:
true
if the string represents falsity
-
-