-
-
Notifications
You must be signed in to change notification settings - Fork 468
Expand file tree
/
Copy pathObjects.java
More file actions
24 lines (19 loc) · 659 Bytes
/
Objects.java
File metadata and controls
24 lines (19 loc) · 659 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
package io.sentry.util;
import java.util.Arrays;
import org.jetbrains.annotations.ApiStatus;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
@ApiStatus.Internal
public final class Objects {
private Objects() {}
public static <T> T requireNonNull(final @Nullable T obj, final @NotNull String message) {
if (obj == null) throw new IllegalArgumentException(message);
return obj;
}
public static boolean equals(@Nullable Object a, @Nullable Object b) {
return (a == b) || (a != null && a.equals(b));
}
public static int hash(@Nullable Object... values) {
return Arrays.hashCode(values);
}
}