Package org.apache.maven.api
Interface VersionConstraint
Version constraint for dependency.
 Constraint is either a range ("[1,2)") or recommended version ("1.0").
 
VersionConstraint objects are created using the
 VersionParser service.- Since:
- 4.0.0
- See Also:
- 
Method SummaryModifier and TypeMethodDescriptionasString()Returns a string representation of this version constraintbooleanDetermines whether the specified version is contained within this constraint.Returns the recommended version of this constraint, ornullif none.Returns the range of this constraint, ornullif none.
- 
Method Details- 
getVersionRangeReturns the range of this constraint, ornullif none.Note: only one, this method or getRecommendedVersion()method must return non-nullvalue.
- 
getRecommendedVersionReturns the recommended version of this constraint, ornullif none.Note: only one, this method or getVersionRange()method must return non-nullvalue.
- 
containsDetermines whether the specified version is contained within this constraint.- Parameters:
- version- the version to test, must not be- null
- Returns:
- trueif this range contains the specified version,- falseotherwise
 
- 
asStringReturns a string representation of this version constraint- Returns:
- the string representation of this version constraint
 
 
-