public final class ObjectSupport extends Object
| Modifier | Constructor and Description |
|---|---|
private |
ObjectSupport()
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
static <T> T |
firstNonNull(T... objects)
Return the first from a list of arguments that is non-null, or null if all arguments
are null.
|
static int |
hashCode(Object o)
Performs a safe (null-aware)
Object.hashCode(). |
public static int hashCode(@Nullable Object o)
Object.hashCode().o - object for which to get the hash code, may be null@Nullable public static <T> T firstNonNull(@Nullable T... objects)
This is similar to Guava's MoreObjects.firstNonNull(Object, Object),
except it takes more than 2 arguments, and also doesn't throw a null pointer exception if
all arguments are null.
T - the type of arguments being evaluatedobjects - the list of object references to evaluateCopyright © 1999–2019 Shibboleth Consortium. All rights reserved.