Package org.eclipse.pde.core.plugin

# 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

## Nested Class Summary

## Nested classes/interfaces inherited from class java.lang.Enum

`Enum.EnumDesc<E extends Enum<E>>`

## Enum Constant Summary

Enum Constants
Enum Constant
Description
`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.
`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.
`GREATER_OR_EQUAL`
A rule that matches if a version is greater than or equal to a reference.
`PERFECT`
A rule that matches if a version is perfectly `equal` to a reference.

## Method Summary

Modifier and Type
Method
Description
`abstract boolean`
`matches(Version version, Version reference)`
`abstract VersionRange`
`rangeFor(Version version)`
`String`
`toString()`
`static VersionMatchRule`
`valueOf(String name)`
Returns the enum constant of this class with the specified name.
`static VersionMatchRule[]`
`values()`
Returns an array containing the constants of this enum class, in the order they are declared.

### Methods inherited from class java.lang.Enum

`clone, compareTo, describeConstable, equals, finalize, getDeclaringClass, hashCode, name, ordinal, valueOf`

### Methods inherited from class java.lang.Object

`getClass, notify, notifyAll, wait, wait, wait`

## 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>`