Class Not

  • All Implemented Interfaces:
    Expression

    class Not
    extends java.lang.Object
    implements Expression
    Expression for the logical "negation" operator.
    Since:
    0.7.0
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private Expression expr
      The expression to negate.
    • Constructor Summary

      Constructors 
      Constructor Description
      Not​(Expression expr)
      Constructs a Not expression with an expression to negate.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean interpret​(Version version)
      Negates the given expression.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • expr

        private final Expression expr
        The expression to negate.
    • Constructor Detail

      • Not

        Not​(Expression expr)
        Constructs a Not expression with an expression to negate.
        Parameters:
        expr - the expression to negate
    • Method Detail

      • interpret

        public boolean interpret​(Version version)
        Negates the given expression.
        Specified by:
        interpret in interface Expression
        Parameters:
        version - the version to interpret against
        Returns:
        true if the given expression evaluates to false and false otherwise