java.lang.Object
com.github.zafarkhaja.semver.expr.Or
All Implemented Interfaces:
Expression

class Or extends Object implements Expression
Expression for the logical "or" operator.
Since:
0.7.0
  • Field Details

    • left

      private final Expression left
      The left-hand operand of expression.
  • Constructor Details

    • Or

      Or(Expression left, Expression right)
      Constructs a Or expression with the left-hand and right-hand operands.
      Parameters:
      left - the left-hand operand of expression
      right - the right-hand operand of expression
  • Method Details

    • interpret

      public boolean interpret(Version version)
      Checks if one of the operands evaluates to true.
      Specified by:
      interpret in interface Expression
      Parameters:
      version - the version to interpret against
      Returns:
      true if one of the operands evaluates to true or false otherwise