Class Greater
- java.lang.Object
-
- com.github.zafarkhaja.semver.expr.Greater
-
- All Implemented Interfaces:
Expression
class Greater extends java.lang.Object implements Expression
Expression for the comparison "greater than" operator.- Since:
- 0.7.0
-
-
Field Summary
Fields Modifier and Type Field Description private VersionparsedVersionThe parsed version, the right-hand operand of the "greater than" operator.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleaninterpret(Version version)Checks if the current version is greater than the parsed version.
-
-
-
Field Detail
-
parsedVersion
private final Version parsedVersion
The parsed version, the right-hand operand of the "greater than" operator.
-
-
Constructor Detail
-
Greater
Greater(Version parsedVersion)
Constructs aGreaterexpression 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 the parsed version.- Specified by:
interpretin interfaceExpression- Parameters:
version- the version to compare to, the left-hand operand of the "greater than" operator- Returns:
trueif the version is greater than the parsed version orfalseotherwise
-
-