what-the-bank/sources/com/google/android/gms/internal/firebase_ml/zzks.java

94 lines
2.8 KiB
Java

package com.google.android.gms.internal.firebase_ml;
/* loaded from: classes2.dex */
public final class zzks {
public static void checkArgument(boolean z) {
if (!z) {
throw new IllegalArgumentException();
}
}
public static void checkArgument(boolean z, Object obj) {
if (!z) {
throw new IllegalArgumentException(String.valueOf(obj));
}
}
public static void checkState(boolean z) {
if (!z) {
throw new IllegalStateException();
}
}
public static <T> T checkNotNull(T t) {
t.getClass();
return t;
}
public static <T> T checkNotNull(T t, Object obj) {
if (t != null) {
return t;
}
throw new NullPointerException(String.valueOf(obj));
}
public static int zzb(int i, int i2) {
String zzb;
if (i >= 0 && i < i2) {
return i;
}
if (i < 0) {
zzb = zzla.zzb("%s (%s) must not be negative", "index", Integer.valueOf(i));
} else if (i2 >= 0) {
zzb = zzla.zzb("%s (%s) must be less than size (%s)", "index", Integer.valueOf(i), Integer.valueOf(i2));
} else {
StringBuilder sb = new StringBuilder(26);
sb.append("negative size: ");
sb.append(i2);
throw new IllegalArgumentException(sb.toString());
}
throw new IndexOutOfBoundsException(zzb);
}
public static int zzc(int i, int i2) {
if (i < 0 || i > i2) {
throw new IndexOutOfBoundsException(zzb(i, i2, "index"));
}
return i;
}
public static int zza(int i, int i2, String str) {
if (i < 0 || i > i2) {
throw new IndexOutOfBoundsException(zzb(i, i2, str));
}
return i;
}
private static String zzb(int i, int i2, String str) {
if (i < 0) {
return zzla.zzb("%s (%s) must not be negative", str, Integer.valueOf(i));
}
if (i2 < 0) {
StringBuilder sb = new StringBuilder(26);
sb.append("negative size: ");
sb.append(i2);
throw new IllegalArgumentException(sb.toString());
}
return zzla.zzb("%s (%s) must not be greater than size (%s)", str, Integer.valueOf(i), Integer.valueOf(i2));
}
public static void zza(int i, int i2, int i3) {
String zzb;
if (i < 0 || i2 < i || i2 > i3) {
if (i < 0 || i > i3) {
zzb = zzb(i, i3, "start index");
} else if (i2 < 0 || i2 > i3) {
zzb = zzb(i2, i3, "end index");
} else {
zzb = zzla.zzb("end index (%s) must not be less than start index (%s)", Integer.valueOf(i2), Integer.valueOf(i));
}
throw new IndexOutOfBoundsException(zzb);
}
}
}