Class BooleanBuiltInLiteral


public class BooleanBuiltInLiteral extends BuiltInLiteral
Implementation of BooleanBuiltInLiteral constants TRUE(), and FALSE()
  • Field Details

  • Constructor Details

    • BooleanBuiltInLiteral

      public BooleanBuiltInLiteral(boolean value)
  • Method Details

    • fromOperator

      public static Optional<Boolean> fromOperator(String operator)
    • getOperationName

      public String getOperationName()
      Description copied from class: BuiltInLiteral
      Returns the built-in literal operation name.
      Specified by:
      getOperationName in class BuiltInLiteral
      Returns:
      the operation name.
    • getTerms

      public ImmutableTermList getTerms()
      Specified by:
      getTerms in class Literal
    • applySubstitution

      public BooleanBuiltInLiteral applySubstitution(Substitution substitution)
      Description copied from class: Literal
      Constructs new Literal after applying the substitution to the literal terms.
      Specified by:
      applySubstitution in class Literal
      Parameters:
      substitution - substitution to apply.
      Returns:
      a literal after applying the given substitution. The literal will be new if some term has changed, otherwise it will be the same.
    • accept

      public <T> T accept(LogicSchemaVisitor<T> visitor)
      Specified by:
      accept in class Literal
    • buildNegatedLiteral

      public BooleanBuiltInLiteral buildNegatedLiteral()
      Description copied from class: Literal
      This method constructs a new literal that is the negation of this one.

      E.g. given an ordinary literal "P(x)" it will return a new literal "not(P(x))", or given a built-in literal "x < y" it will return "x >= y"

      Overrides:
      buildNegatedLiteral in class Literal
      Returns:
      a new literal that is the negation of this literal, if this is possible.
    • isTrue

      public boolean isTrue()
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • fromValue

      public static String fromValue(boolean booleanValue)
    • isFalse

      public boolean isFalse()