public class VersionRangePackageConstraint extends PackageConstraint
| Constructor and Description |
|---|
VersionRangePackageConstraint(Package p)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
checkConstraint(Package target)
Check the target package against the constraint embodied
in this PackageConstraint.
|
PackageConstraint |
checkConstraint(PackageConstraint target)
Check the target package constraint against the constraint embodied
in this package constraint.
|
java.lang.String |
getLowerBound()
Get the lower bound of this range
|
VersionPackageConstraint.VersionComparison |
getLowerComparison()
Get the lower comparison
|
java.lang.String |
getUpperBound()
Get the upper bound of this range
|
VersionPackageConstraint.VersionComparison |
getUpperComparison()
Get the upper comparison
|
boolean |
isBoundOR()
Returns true if this is a bounded OR type of constraint
|
void |
setRangeConstraint(java.lang.String bound1,
VersionPackageConstraint.VersionComparison comp1,
java.lang.String bound2,
VersionPackageConstraint.VersionComparison comp2)
Set the range bounds and constraints.
|
getPackage, setPackagepublic VersionRangePackageConstraint(Package p)
p - the package to base this constraint onpublic void setRangeConstraint(java.lang.String bound1,
VersionPackageConstraint.VersionComparison comp1,
java.lang.String bound2,
VersionPackageConstraint.VersionComparison comp2)
throws java.lang.Exception
bound1 - the first boundcomp1 - the first comparisonbound2 - the second boundcomp2 - the second comparisonjava.lang.Exception - if the range constraint is malformedpublic java.lang.String getLowerBound()
public java.lang.String getUpperBound()
public VersionPackageConstraint.VersionComparison getLowerComparison()
public VersionPackageConstraint.VersionComparison getUpperComparison()
public boolean isBoundOR()
public boolean checkConstraint(Package target) throws java.lang.Exception
checkConstraint in class PackageConstrainttarget - a package to check with respect to the
encapsulated package and the constraint.java.lang.Exception - if the constraint can't be checked for some
reason.public PackageConstraint checkConstraint(PackageConstraint target) throws java.lang.Exception
PackageConstraintcheckConstraint in class PackageConstrainttarget - the package constraint to compare againstjava.lang.Exception