Enum Class VersionMatchRule

java.lang.Object
java.lang.Enum<VersionMatchRule>
org.eclipse.pde.core.plugin.VersionMatchRule
All Implemented Interfaces:
Serializable, Comparable<VersionMatchRule>, Constable

public enum VersionMatchRule extends Enum<VersionMatchRule>
Defines the rules that are used to control when two compared versions match.
Since:
3.19
  • Enum Constant Details

    • PERFECT

      public static final VersionMatchRule PERFECT
      A rule that matches if a version is perfectly equal to a reference.
    • EQUIVALENT

      public static final VersionMatchRule EQUIVALENT
      A rule that matches if a version is equivalent to a reference, which is the case if that version has the same major and minor component and apart from that is greater than or equal to the reference.
    • COMPATIBLE

      public static final VersionMatchRule COMPATIBLE
      A rule that matches if a version is compatible to a reference, which is the case if that version has the same major component and apart from that is greater than or equal to the reference.
    • GREATER_OR_EQUAL

      public static final VersionMatchRule GREATER_OR_EQUAL
      A rule that matches if a version is greater than or equal to a reference.
  • Method Details

    • values

      public static VersionMatchRule[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static VersionMatchRule valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • rangeFor

      public abstract VersionRange rangeFor(Version version)
    • matches

      public abstract boolean matches(Version version, Version reference)
    • toString

      public String toString()
      Overrides:
      toString in class Enum<VersionMatchRule>