Package org.apache.maven.api
Interface VersionConstraint
Version constraint for dependency. Constraint is either a range ("[1,2)") or recommended version ("1.0").
- Since:
 - 4.0.0
 
- 
Method Summary
Modifier 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
- 
getVersionRange
Returns the range of this constraint, ornullif none.Note: only one, this method or
getRecommendedVersion()method must return non-nullvalue. - 
getRecommendedVersion
Returns the recommended version of this constraint, ornullif none.Note: only one, this method or
getVersionRange()method must return non-nullvalue. - 
contains
Determines whether the specified version is contained within this constraint.- Parameters:
 version- the version to test, must not benull- Returns:
 trueif this range contains the specified version,falseotherwise
 - 
asString
Returns a string representation of this version constraint- Returns:
 - the string representation of this version constraint
 
 
 -