{
if (importPackage.equals(exportPackage))
{
if (importParameters.containsKey(Constants.VERSION_ATTRIBUTE))
{
VersionRange range = (VersionRange) importParameters.get(Constants.VERSION_ATTRIBUTE);
if (!range.includes((Version) exportParameters.get(Constants.VERSION_ATTRIBUTE))) return false;
}
if (importParameters.containsKey(Constants.PACKAGE_SPECIFICATION_VERSION))
{
VersionRange range = (VersionRange) importParameters.get(Constants.PACKAGE_SPECIFICATION_VERSION);
if (!range.includes((Version) exportParameters.get(Constants.VERSION_ATTRIBUTE))) return false;
}
if (importParameters.containsKey(Constants.BUNDLE_SYMBOLICNAME_ATTRIBUTE))
{
String symbolicName = (String) importParameters.get(Constants.BUNDLE_SYMBOLICNAME_ATTRIBUTE);
if (!symbolicName.equals(candidateExport.getCandidate().getGeneration().getSymbolicName())) return false;
}
if (importParameters.containsKey(Constants.BUNDLE_VERSION_ATTRIBUTE))
{
VersionRange range = (VersionRange) importParameters.get(Constants.BUNDLE_VERSION_ATTRIBUTE);
if (!range.includes(candidateExport.getCandidate().getGeneration().getVersion())) return false;
}
Set<String> importKeys = new HashSet<String>(importParameters.keySet());
importKeys.removeAll(Arrays.asList(Constants.VERSION_ATTRIBUTE, Constants.PACKAGE_SPECIFICATION_VERSION, Constants.BUNDLE_SYMBOLICNAME_ATTRIBUTE, Constants.BUNDLE_VERSION_ATTRIBUTE, Constants.MANDATORY_DIRECTIVE));
importKeys.removeAll(exportDescription.getMandatory());