Package org.eclipse.aether.version
Interface VersionConstraint
- All Known Implementing Classes:
 TestVersionConstraint
public interface VersionConstraint
A constraint on versions for a dependency. A constraint can either consist of a version range (e.g. "[1, ]") or a
 single version (e.g. "1.1"). In the first case, the constraint expresses a hard requirement on a version matching the
 range. In the second case, the constraint expresses a soft requirement on a specific version (i.e. a recommendation).
- 
Method Summary
Modifier and TypeMethodDescriptionbooleancontainsVersion(Version version) Determines whether the specified version satisfies this constraint.getRange()Gets the version range of this constraint.Gets the version recommended by this constraint. 
- 
Method Details
- 
getRange
Gets the version range of this constraint.- Returns:
 - The version range or 
nullif none. 
 - 
getVersion
Gets the version recommended by this constraint.- Returns:
 - The recommended version or 
nullif none. 
 - 
containsVersion
Determines whether the specified version satisfies this constraint. In more detail, a version satisfies this constraint if it matches its version range or if this constraint has no version range and the specified version equals the version recommended by the constraint.- Parameters:
 version- The version to test, must not benull.- Returns:
 trueif the specified version satisfies this constraint,falseotherwise.
 
 -