Class GreaterOrEqual
- java.lang.Object
-
- com.github.zafarkhaja.semver.expr.GreaterOrEqual
-
- All Implemented Interfaces:
Expression
class GreaterOrEqual extends java.lang.Object implements Expression
Expression for the comparison "greater than or equal to" operator.- Since:
- 0.7.0
-
-
Field Summary
Fields Modifier and Type Field Description private Version
parsedVersion
The parsed version, the right-hand operand of the "greater than or equal to" operator.
-
Constructor Summary
Constructors Constructor Description GreaterOrEqual(Version parsedVersion)
Constructs aGreaterOrEqual
expression with the parsed version.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
interpret(Version version)
Checks if the current version is greater than or equal to the parsed version.
-
-
-
Field Detail
-
parsedVersion
private final Version parsedVersion
The parsed version, the right-hand operand of the "greater than or equal to" operator.
-
-
Constructor Detail
-
GreaterOrEqual
GreaterOrEqual(Version parsedVersion)
Constructs aGreaterOrEqual
expression with the parsed version.- Parameters:
parsedVersion
- the parsed version
-
-
Method Detail
-
interpret
public boolean interpret(Version version)
Checks if the current version is greater than or equal to the parsed version.- Specified by:
interpret
in interfaceExpression
- Parameters:
version
- the version to compare to, the left-hand operand of the "greater than or equal to" operator- Returns:
true
if the version is greater than or equal to the parsed version orfalse
otherwise
-
-