Class TestVersionConstraint
java.lang.Object
org.eclipse.aether.internal.test.util.TestVersionConstraint
- All Implemented Interfaces:
VersionConstraint
A constraint on versions for a dependency.
-
Constructor Summary
ConstructorsConstructorDescriptionTestVersionConstraint(Version version) Creates a version constraint from the specified version.Creates a version constraint from the specified version range. -
Method Summary
Modifier and TypeMethodDescriptionbooleancontainsVersion(Version version) Determines whether the specified version satisfies this constraint.booleangetRange()Gets the version range of this constraint.Gets the version recommended by this constraint.inthashCode()toString()
-
Constructor Details
-
TestVersionConstraint
Creates a version constraint from the specified version range.- Parameters:
range- The version range, must not benull.
-
TestVersionConstraint
Creates a version constraint from the specified version.- Parameters:
version- The version, must not benull.
-
-
Method Details
-
getRange
Description copied from interface:VersionConstraintGets the version range of this constraint.- Specified by:
getRangein interfaceVersionConstraint- Returns:
- The version range or
nullif none.
-
getVersion
Description copied from interface:VersionConstraintGets the version recommended by this constraint.- Specified by:
getVersionin interfaceVersionConstraint- Returns:
- The recommended version or
nullif none.
-
containsVersion
Description copied from interface:VersionConstraintDetermines 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.- Specified by:
containsVersionin interfaceVersionConstraint- Parameters:
version- The version to test, must not benull.- Returns:
trueif the specified version satisfies this constraint,falseotherwise.
-
toString
-
equals
-
hashCode
-