- java.lang.Object
-
- com.pervasive.datarush.encoding.text.TruthValues
-
- Direct Known Subclasses:
ExactTruthMapping,InsensitiveTruthMapping
public abstract class TruthValues extends Object
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.
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedTruthValues(String truth, String falsity)Defines a new mapping, specifying the canonical representations oftrueandfalse.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description StringfalseValue()Gets the string value forfalse.abstract booleanisFalse(String text)Indicates whether the given string is a representation forfalse.abstract booleanisTrue(String text)Indicates whether the given string is a representation fortrue.StringtrueValue()Gets the string value fortrue.
-
-
-
Method Detail
-
falseValue
public String falseValue()
Gets the string value forfalse.- Returns:
- the canonical string representation of
false.
-
trueValue
public String trueValue()
Gets the string value fortrue.- Returns:
- the canonical string representation of
true.
-
isTrue
public abstract boolean isTrue(String text)
Indicates whether the given string is a representation fortrue.- Parameters:
text- the string to check- Returns:
trueif the string represents truth
-
isFalse
public abstract boolean isFalse(String text)
Indicates whether the given string is a representation forfalse.- Parameters:
text- the string to check- Returns:
trueif the string represents falsity
-
-