mirror of
https://github.com/VibedByKaKi/alexandroid.git
synced 2026-11-16 10:57:17 +01:00
43 lines
1.5 KiB
Java
43 lines
1.5 KiB
Java
package io.reactivex.rxjava3.internal.functions;
|
|
|
|
import androidx.room.util.TableInfo$$ExternalSyntheticOutline0;
|
|
import io.reactivex.rxjava3.functions.BiPredicate;
|
|
import java.util.Objects;
|
|
import rx.Single$$ExternalSyntheticBUOutline0;
|
|
|
|
/* compiled from: r8-map-id-b9432e0f623b4a4bff4ba50a8a24c4aafad2c1e11092747b9fb5e6a22af5a940 */
|
|
/* loaded from: classes10.dex */
|
|
public final class ObjectHelper {
|
|
static final BiPredicate<Object, Object> EQUALS = new BiObjectPredicate();
|
|
|
|
/* compiled from: r8-map-id-b9432e0f623b4a4bff4ba50a8a24c4aafad2c1e11092747b9fb5e6a22af5a940 */
|
|
public static final class BiObjectPredicate implements BiPredicate<Object, Object> {
|
|
@Override // io.reactivex.rxjava3.functions.BiPredicate
|
|
public boolean test(Object obj, Object obj2) {
|
|
return Objects.equals(obj, obj2);
|
|
}
|
|
}
|
|
|
|
private ObjectHelper() {
|
|
throw new IllegalStateException("No instances!");
|
|
}
|
|
|
|
public static <T> BiPredicate<T, T> equalsPredicate() {
|
|
return (BiPredicate<T, T>) EQUALS;
|
|
}
|
|
|
|
public static long verifyPositive(long j, String str) {
|
|
if (j > 0) {
|
|
return j;
|
|
}
|
|
throw new IllegalArgumentException(str + " > 0 required but it was " + j);
|
|
}
|
|
|
|
public static int verifyPositive(int i, String str) {
|
|
if (i > 0) {
|
|
return i;
|
|
}
|
|
Single$$ExternalSyntheticBUOutline0.m$3(TableInfo$$ExternalSyntheticOutline0.m(i, str, " > 0 required but it was "));
|
|
return 0;
|
|
}
|
|
}
|