package y; import java.util.Locale; /* loaded from: classes.dex */ public abstract class h { public static void a(boolean z10, Object obj) { if (!z10) { throw new IllegalArgumentException(String.valueOf(obj)); } } public static int b(int i10, int i11, int i12, String str) { if (i10 < i11) { throw new IllegalArgumentException(String.format(Locale.US, "%s is out of range of [%d, %d] (too low)", str, Integer.valueOf(i11), Integer.valueOf(i12))); } if (i10 <= i12) { return i10; } throw new IllegalArgumentException(String.format(Locale.US, "%s is out of range of [%d, %d] (too high)", str, Integer.valueOf(i11), Integer.valueOf(i12))); } public static int c(int i10) { if (i10 >= 0) { return i10; } throw new IllegalArgumentException(); } public static int d(int i10, int i11) { if ((i10 & i11) == i10) { return i10; } throw new IllegalArgumentException("Requested flags 0x" + Integer.toHexString(i10) + ", but only 0x" + Integer.toHexString(i11) + " are allowed"); } public static Object e(Object obj) { obj.getClass(); return obj; } public static Object f(Object obj, Object obj2) { if (obj != null) { return obj; } throw new NullPointerException(String.valueOf(obj2)); } }