Class Or
- java.lang.Object
-
- com.github.zafarkhaja.semver.expr.Or
-
- All Implemented Interfaces:
Expression
class Or extends java.lang.Object implements Expression
Expression for the logical "or" operator.- Since:
- 0.7.0
-
-
Field Summary
Fields Modifier and Type Field Description private ExpressionleftThe left-hand operand of expression.private ExpressionrightThe right-hand operand of expression.
-
Constructor Summary
Constructors Constructor Description Or(Expression left, Expression right)Constructs aOrexpression with the left-hand and right-hand operands.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleaninterpret(Version version)Checks if one of the operands evaluates totrue.
-
-
-
Field Detail
-
left
private final Expression left
The left-hand operand of expression.
-
right
private final Expression right
The right-hand operand of expression.
-
-
Constructor Detail
-
Or
Or(Expression left, Expression right)
Constructs aOrexpression with the left-hand and right-hand operands.- Parameters:
left- the left-hand operand of expressionright- the right-hand operand of expression
-
-
Method Detail
-
interpret
public boolean interpret(Version version)
Checks if one of the operands evaluates totrue.- Specified by:
interpretin interfaceExpression- Parameters:
version- the version to interpret against- Returns:
trueif one of the operands evaluates totrueorfalseotherwise
-
-