Class Tilde

java.lang.Object
org.opensearch.semver.expr.Tilde
All Implemented Interfaces:
Expression

public class Tilde extends Object implements Expression
Expression to evaluate version compatibility allowing patch version variability.
  • Constructor Details

    • Tilde

      public Tilde()
  • Method Details

    • evaluate

      public boolean evaluate(Version rangeVersion, Version versionToEvaluate)
      Checks if the given version is compatible with a range version allowing for patch version variability. Allows all versions starting from the rangeVersion upto next minor version (exclusive).
      Specified by:
      evaluate in interface Expression
      Parameters:
      rangeVersion - the version specified in range
      versionToEvaluate - the version to evaluate
      Returns:
      true if the versions are compatible false otherwise