| Modifier and Type | Method and Description |
|---|---|
static int |
compare(int v1,
int v2)
Compares two integer values similar to Integer.compare.
|
static int |
compare(long v1,
long v2)
Compares two integer values similar to Long.compare.
|
static boolean |
equals(java.lang.Object o1,
java.lang.Object o2)
Compares two potentially null objects with each other using Object.equals.
|
static <T> BiPredicate<T,T> |
equalsPredicate()
Returns a BiPredicate that compares its parameters via Objects.equals().
|
static int |
hashCode(java.lang.Object o)
Returns the hashCode of a non-null object or zero for a null object.
|
static <T> T |
requireNonNull(T object,
java.lang.String message)
Verifies if the object is not null and returns it or throws a NullPointerException
with the given message.
|
static Objects |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static Objects[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static Objects[] values()
for (Objects c : Objects.values()) System.out.println(c);
public static Objects valueOf(java.lang.String name)
name - the name of the enum constant to be returned.java.lang.IllegalArgumentException - if this enum type has no constant with the specified namejava.lang.NullPointerException - if the argument is nullpublic static final <T> T requireNonNull(T object,
java.lang.String message)
T - the value typeobject - the object to verifymessage - the message to use with the NullPointerExceptionjava.lang.NullPointerException - if object is nullpublic static boolean equals(java.lang.Object o1,
java.lang.Object o2)
o1 - the first objecto2 - the second objectpublic static int hashCode(java.lang.Object o)
o - the object to get the hashCode for.public static int compare(int v1,
int v2)
v1 - the first valuev2 - the second valuepublic static int compare(long v1,
long v2)
v1 - the first valuev2 - the second valuepublic static <T> BiPredicate<T,T> equalsPredicate()
T - the value type