in connectfeaturelauncher/src/main/java/org/osgi/framework/FrameworkUtil.java [736:788]
private boolean compare(int operation, Object value1, Object value2) {
if (value1 == null) {
return false;
}
if (value1 instanceof String) {
return compare_String(operation, (String) value1, value2);
}
if (value1 instanceof Version) {
return compare_Version(operation, (Version) value1, value2);
}
Class<?> clazz = value1.getClass();
if (clazz.isArray()) {
Class<?> type = clazz.getComponentType();
if (type.isPrimitive()) {
return compare_PrimitiveArray(operation, type, value1, value2);
}
return compare_ObjectArray(operation, (Object[]) value1, value2);
}
if (value1 instanceof Collection<?>) {
return compare_Collection(operation, (Collection<?>) value1, value2);
}
if (value1 instanceof Integer) {
return compare_Integer(operation, ((Integer) value1).intValue(), value2);
}
if (value1 instanceof Long) {
return compare_Long(operation, ((Long) value1).longValue(), value2);
}
if (value1 instanceof Byte) {
return compare_Byte(operation, ((Byte) value1).byteValue(), value2);
}
if (value1 instanceof Short) {
return compare_Short(operation, ((Short) value1).shortValue(), value2);
}
if (value1 instanceof Character) {
return compare_Character(operation, ((Character) value1).charValue(), value2);
}
if (value1 instanceof Float) {
return compare_Float(operation, ((Float) value1).floatValue(), value2);
}
if (value1 instanceof Double) {
return compare_Double(operation, ((Double) value1).doubleValue(), value2);
}
if (value1 instanceof Boolean) {
return compare_Boolean(operation, ((Boolean) value1).booleanValue(), value2);
}
if (value1 instanceof Comparable<?>) {
@SuppressWarnings("unchecked")
Comparable<Object> comparable = (Comparable<Object>) value1;
return compare_Comparable(operation, comparable, value2);
}
return compare_Unknown(operation, value1, value2);
}