package com.google.firebase.firestore.util; /* loaded from: classes2.dex */ public class Assert { public static void hardAssert(boolean z, String str, Object... objArr) { if (!z) { throw fail(str, objArr); } } public static T hardAssertNonNull(T t, String str, Object... objArr) { if (t != null) { return t; } throw fail(str, objArr); } public static AssertionError fail(String str, Object... objArr) { throw new AssertionError(format(str, objArr)); } public static AssertionError fail(Throwable th, String str, Object... objArr) { throw ApiUtil.newAssertionError(format(str, objArr), th); } private static String format(String str, Object... objArr) { StringBuilder sb = new StringBuilder("INTERNAL ASSERTION FAILED: "); sb.append(String.format(str, objArr)); return sb.toString(); } }