jimu-decompiled/sources/io/reactivex/internal/functions/ObjectHelper.java
2025-05-13 19:24:51 +02:00

62 lines
1.5 KiB
Java

package io.reactivex.internal.functions;
import io.reactivex.functions.BiPredicate;
/* loaded from: classes2.dex */
public final class ObjectHelper {
static final BiPredicate<Object, Object> a = new BiObjectPredicate();
static final class BiObjectPredicate implements BiPredicate<Object, Object> {
BiObjectPredicate() {
}
@Override // io.reactivex.functions.BiPredicate
public boolean a(Object obj, Object obj2) {
return ObjectHelper.a(obj, obj2);
}
}
public static int a(int i, int i2) {
if (i < i2) {
return -1;
}
return i > i2 ? 1 : 0;
}
public static int a(long j, long j2) {
if (j < j2) {
return -1;
}
return j > j2 ? 1 : 0;
}
public static <T> T a(T t, String str) {
if (t != null) {
return t;
}
throw new NullPointerException(str);
}
public static boolean a(Object obj, Object obj2) {
return obj == obj2 || (obj != null && obj.equals(obj2));
}
public static <T> BiPredicate<T, T> a() {
return (BiPredicate<T, T>) a;
}
public static int a(int i, String str) {
if (i > 0) {
return i;
}
throw new IllegalArgumentException(str + " > 0 required but it was " + i);
}
public static long a(long j, String str) {
if (j > 0) {
return j;
}
throw new IllegalArgumentException(str + " > 0 required but it was " + j);
}
}