public class OSGiCompatibilityPolicy extends java.lang.Object implements CompatibilityPolicy
Constructor and Description |
---|
OSGiCompatibilityPolicy(Oscar oscar) |
Modifier and Type | Method and Description |
---|---|
int |
compare(java.lang.Object leftId,
java.lang.Object leftVersion,
java.lang.Object rightId,
java.lang.Object rightVersion)
Compares two versioned identifiers.
|
boolean |
isCompatible(java.lang.Object leftId,
java.lang.Object leftVersion,
java.lang.Object rightId,
java.lang.Object rightVersion)
Returns whether the first import/export target is compatible
with the second.
|
public OSGiCompatibilityPolicy(Oscar oscar)
public int compare(java.lang.Object leftId, java.lang.Object leftVersion, java.lang.Object rightId, java.lang.Object rightVersion)
compare
in interface CompatibilityPolicy
leftId
- the identifier to test for compatibility.leftVersion
- the version number to test for compatibility.rightId
- the identifier used as the compatibility base line.rightVersion
- the version used as the compatibility base line.java.lang.IllegalArgumentException
- if the two identifiers
are not comparable, i.e., they refer to completely different
entities.public boolean isCompatible(java.lang.Object leftId, java.lang.Object leftVersion, java.lang.Object rightId, java.lang.Object rightVersion)
isCompatible
in interface CompatibilityPolicy
leftId
- the identifier to test for compatibility.leftVersion
- the version number to test for compatibility.rightId
- the identifier used as the compatibility base line.rightVersion
- the version used as the compatibility base line.