Class Greater

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

class Greater extends Object implements Expression
Expression for the comparison "greater than" operator.
Since:
0.7.0
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final Version
    The parsed version, the right-hand operand of the "greater than" operator.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Greater(Version parsedVersion)
    Constructs a Greater expression with the parsed version.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    interpret(Version version)
    Checks if the current version is greater than the parsed version.

    Methods inherited from class java.lang.Object

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

    • parsedVersion

      private final Version parsedVersion
      The parsed version, the right-hand operand of the "greater than" operator.
  • Constructor Details

    • Greater

      Greater(Version parsedVersion)
      Constructs a Greater expression with the parsed version.
      Parameters:
      parsedVersion - the parsed version
  • Method Details

    • interpret

      public boolean interpret(Version version)
      Checks if the current version is greater than the parsed version.
      Specified by:
      interpret in interface Expression
      Parameters:
      version - the version to compare to, the left-hand operand of the "greater than" operator
      Returns:
      true if the version is greater than the parsed version or false otherwise