public class VersionRangePackageConstraint extends PackageConstraint
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
m_boundOr
is false for version1 <= package <= version2
|
protected java.lang.String |
m_lowerBound
the lower bound
|
protected VersionPackageConstraint.VersionComparison |
m_lowerConstraint
the comparison for the lower bound
|
protected java.lang.String |
m_upperBound
the upper bound
|
protected VersionPackageConstraint.VersionComparison |
m_upperConstraint
the comparison for the upper bound
|
m_thePackage| 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.
|
protected static boolean |
checkConstraint(java.lang.String toCheck,
VersionPackageConstraint.VersionComparison comp1,
java.lang.String bound1,
VersionPackageConstraint.VersionComparison comp2,
java.lang.String bound2,
boolean boundOr) |
protected PackageConstraint |
checkTargetVersionPackageConstraint(VersionPackageConstraint target) |
protected PackageConstraint |
checkTargetVersionRangePackageConstraint(VersionRangePackageConstraint target) |
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.
|
java.lang.String |
toString() |
getPackage, setPackageprotected java.lang.String m_lowerBound
protected VersionPackageConstraint.VersionComparison m_lowerConstraint
protected java.lang.String m_upperBound
protected VersionPackageConstraint.VersionComparison m_upperConstraint
protected boolean m_boundOr
public 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()
protected static boolean checkConstraint(java.lang.String toCheck,
VersionPackageConstraint.VersionComparison comp1,
java.lang.String bound1,
VersionPackageConstraint.VersionComparison comp2,
java.lang.String bound2,
boolean boundOr)
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.protected PackageConstraint checkTargetVersionRangePackageConstraint(VersionRangePackageConstraint target) throws java.lang.Exception
java.lang.Exceptionprotected PackageConstraint checkTargetVersionPackageConstraint(VersionPackageConstraint target) throws java.lang.Exception
java.lang.Exceptionpublic PackageConstraint checkConstraint(PackageConstraint target) throws java.lang.Exception
PackageConstraintcheckConstraint in class PackageConstrainttarget - the package constraint to compare againstjava.lang.Exceptionpublic java.lang.String toString()
toString in class java.lang.Object