- 28,932 files - Full Java source code - Smali files - Resources Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
46 lines
1.1 KiB
Java
46 lines
1.1 KiB
Java
package androidx.core.util;
|
|
|
|
import androidx.annotation.NonNull;
|
|
import androidx.annotation.Nullable;
|
|
import java.util.Objects;
|
|
|
|
/* loaded from: classes.dex */
|
|
public class ObjectsCompat {
|
|
private ObjectsCompat() {
|
|
}
|
|
|
|
public static boolean equals(@Nullable Object obj, @Nullable Object obj2) {
|
|
return Objects.equals(obj, obj2);
|
|
}
|
|
|
|
public static int hashCode(@Nullable Object obj) {
|
|
if (obj != null) {
|
|
return obj.hashCode();
|
|
}
|
|
return 0;
|
|
}
|
|
|
|
public static int hash(@Nullable Object... objArr) {
|
|
return Objects.hash(objArr);
|
|
}
|
|
|
|
@Nullable
|
|
public static String toString(@Nullable Object obj, @Nullable String str) {
|
|
return obj != null ? obj.toString() : str;
|
|
}
|
|
|
|
@NonNull
|
|
public static <T> T requireNonNull(@Nullable T t) {
|
|
t.getClass();
|
|
return t;
|
|
}
|
|
|
|
@NonNull
|
|
public static <T> T requireNonNull(@Nullable T t, @NonNull String str) {
|
|
if (t != null) {
|
|
return t;
|
|
}
|
|
throw new NullPointerException(str);
|
|
}
|
|
}
|