- Added realracing3-community.apk (71.57 MB) - Removed 32-bit support (armeabi-v7a) - Only includes arm64-v8a libraries - Decompiled source code included - Added README-community.md with analysis
40 lines
1.3 KiB
Java
40 lines
1.3 KiB
Java
package kotlin.comparisons;
|
|
|
|
import kotlin.jvm.functions.Function1;
|
|
import kotlin.jvm.internal.Intrinsics;
|
|
|
|
/* loaded from: classes5.dex */
|
|
public abstract class ComparisonsKt__ComparisonsKt {
|
|
public static int compareValuesBy(Object obj, Object obj2, Function1... selectors) {
|
|
Intrinsics.checkNotNullParameter(selectors, "selectors");
|
|
if (selectors.length <= 0) {
|
|
throw new IllegalArgumentException("Failed requirement.".toString());
|
|
}
|
|
return compareValuesByImpl$ComparisonsKt__ComparisonsKt(obj, obj2, selectors);
|
|
}
|
|
|
|
public static final int compareValuesByImpl$ComparisonsKt__ComparisonsKt(Object obj, Object obj2, Function1[] function1Arr) {
|
|
int compareValues;
|
|
for (Function1 function1 : function1Arr) {
|
|
compareValues = compareValues((Comparable) function1.invoke(obj), (Comparable) function1.invoke(obj2));
|
|
if (compareValues != 0) {
|
|
return compareValues;
|
|
}
|
|
}
|
|
return 0;
|
|
}
|
|
|
|
public static int compareValues(Comparable comparable, Comparable comparable2) {
|
|
if (comparable == comparable2) {
|
|
return 0;
|
|
}
|
|
if (comparable == null) {
|
|
return -1;
|
|
}
|
|
if (comparable2 == null) {
|
|
return 1;
|
|
}
|
|
return comparable.compareTo(comparable2);
|
|
}
|
|
}
|