|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface VersionConstraint
An extension version constraint. Generally on a dependency. A constraint can either consist of one or more version ranges or a single version. In the first case, the constraint expresses a hard requirement on a version matching one of its ranges. In the second case, the constraint expresses a soft requirement on a specific version (i.e. a recommendation).
| Method Summary | |
|---|---|
boolean |
containsVersion(Version version)
Indicate if the provided Version satisfies the constraint. |
Collection<VersionRangeCollection> |
getRanges()
Gets the version ranges of this constraint. |
String |
getValue()
|
Version |
getVersion()
Gets the version recommended by this constraint. |
boolean |
isCompatible(Version version)
Indicate of the provided Version is compatible with this version. |
VersionConstraint |
merge(VersionConstraint versionConstraint)
Merge too version constraints in one. |
| Method Detail |
|---|
Collection<VersionRangeCollection> getRanges()
Version getVersion()
String getValue()
boolean containsVersion(Version version)
Version satisfies the constraint.
version - the version to test, null is invalid
boolean isCompatible(Version version)
Version is compatible with this version.
The difference with containsVersion(Version) is that this method is trying to determine if this version
should work with this constraint while containsVersion(Version) indicate if that's the ideal version for
this constraint. This apply with constraint not defining an exact version range but only a recommended version
constraint, in that case the constraint indicate what is the version that would ideally be required but it should
work with more recent version.
version - the version to test, null is invalid
VersionConstraint merge(VersionConstraint versionConstraint)
throws IncompatibleVersionConstraintException
versionConstraint - the version constraint to merge with this version constraint
IncompatibleVersionConstraintException - the provided version constraint is compatible with the provided
version constraint
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||