public interface VersionConstraint extends Serializable
Modifier and Type | Method and Description |
---|---|
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 if the provided
Version is compatible with this version. |
VersionConstraint |
merge(VersionConstraint versionConstraint)
Merge two versions constraints in one.
|
Collection<VersionRangeCollection> getRanges()
Version getVersion()
String getValue()
boolean containsVersion(Version version)
Version
satisfies the constraint.version
- the version to test, null is invalidboolean 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 invalidVersionConstraint merge(VersionConstraint versionConstraint) throws IncompatibleVersionConstraintException
versionConstraint
- the version constraint to merge with this version constraintIncompatibleVersionConstraintException
- the provided version constraint is not compatible with the
provided version constraintCopyright © 2004–2021 XWiki. All rights reserved.