40 lines
938 B
Java
40 lines
938 B
Java
package com.bumptech.glide.util;
|
|
|
|
import android.text.TextUtils;
|
|
import java.util.Collection;
|
|
|
|
/* loaded from: classes.dex */
|
|
public final class Preconditions {
|
|
public static void a(boolean z, String str) {
|
|
if (!z) {
|
|
throw new IllegalArgumentException(str);
|
|
}
|
|
}
|
|
|
|
public static <T> T a(T t) {
|
|
a(t, "Argument must not be null");
|
|
return t;
|
|
}
|
|
|
|
public static <T> T a(T t, String str) {
|
|
if (t != null) {
|
|
return t;
|
|
}
|
|
throw new NullPointerException(str);
|
|
}
|
|
|
|
public static String a(String str) {
|
|
if (TextUtils.isEmpty(str)) {
|
|
throw new IllegalArgumentException("Must not be null or empty");
|
|
}
|
|
return str;
|
|
}
|
|
|
|
public static <T extends Collection<Y>, Y> T a(T t) {
|
|
if (t.isEmpty()) {
|
|
throw new IllegalArgumentException("Must not be empty.");
|
|
}
|
|
return t;
|
|
}
|
|
}
|