Class Caret

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

public class Caret extends Object implements Expression
Expression to evaluate version compatibility allowing for minor and patch version variability.
  • Constructor Details

    • Caret

      public Caret()
  • Method Details

    • evaluate

      public boolean evaluate(Version rangeVersion, Version versionToEvaluate)
      Checks if the given version is compatible with the range version allowing for minor and patch version variability. Allows all versions starting from the rangeVersion upto next major 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