what-the-bank/sources/com/google/firebase/firestore/util/Preconditions.java

31 lines
791 B
Java

package com.google.firebase.firestore.util;
import java.util.Locale;
/* loaded from: classes2.dex */
public class Preconditions {
public static <T> T checkNotNull(T t) {
return t;
}
public static void checkArgument(boolean z, String str, Object... objArr) {
if (!z) {
throw new IllegalArgumentException(String.format(str, objArr));
}
}
public static <T> T checkNotNull(T t, Object obj) {
if (t != null) {
return t;
}
throw new NullPointerException(String.valueOf(obj));
}
public static <T> T checkNotNull(T t, String str, Object... objArr) {
if (t != null) {
return t;
}
throw new NullPointerException(String.format(Locale.US, str, objArr));
}
}