public class ExactCompatibilityPolicy extends java.lang.Object implements CompatibilityPolicy
CompatibilityPolicy
,
ImportSearchPolicy
Constructor and Description |
---|
ExactCompatibilityPolicy() |
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, but since this policy has
no understanding of how to compare identifiers, it always throws
an IllegalArgumentException.
|
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 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.