Class InsensitiveTruthMapping

java.lang.Object
com.pervasive.datarush.encoding.text.TruthValues
com.pervasive.datarush.encoding.text.InsensitiveTruthMapping

public class InsensitiveTruthMapping extends TruthValues
A one-to-one mapping of strings to boolean values which does case-insensitive comparisons.
  • Constructor Details

    • InsensitiveTruthMapping

      public InsensitiveTruthMapping(String truth, String falsity)
      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 of true
      falsity - the string representation of false
  • Method Details

    • falseValue

      public String falseValue()
      Description copied from class: TruthValues
      Gets the string value for false.
      Overrides:
      falseValue in class TruthValues
      Returns:
      the canonical string representation of false.
    • trueValue

      public String trueValue()
      Description copied from class: TruthValues
      Gets the string value for true.
      Overrides:
      trueValue in class TruthValues
      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 for true.
      Specified by:
      isTrue in class TruthValues
      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 for false.
      Specified by:
      isFalse in class TruthValues
      Parameters:
      text - the string to check
      Returns:
      true if the string represents falsity