Java java.util Objects fields, constructors, methods, implement or subclass

Example usage for Java java.util Objects fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for java.util Objects.

The text is from its open source code.

Method

intcompare(T a, T b, Comparator c)
Returns 0 if the arguments are identical and c.compare(a, b) otherwise.
booleandeepEquals(Object a, Object b)
Returns true if the arguments are deeply equal to each other and false otherwise.
booleanequals(Object a, Object b)
Returns true if the arguments are equal to each other and false otherwise.
inthash(Object... values)
Generates a hash code for a sequence of input values.
inthashCode(Object o)
Returns the hash code of a non- null argument and 0 for a null argument.
booleanisNull(Object obj)
Returns true if the provided reference is null otherwise returns false .
booleannonNull(Object obj)
Returns true if the provided reference is non- null otherwise returns false .
TrequireNonNull(T obj)
Checks that the specified object reference is not null .
TrequireNonNull(T obj, String message)
Checks that the specified object reference is not null and throws a customized NullPointerException if it is.
TrequireNonNull(T obj, Supplier messageSupplier)
Checks that the specified object reference is not null and throws a customized NullPointerException if it is.
TrequireNonNullElse(T obj, T defaultObj)
Returns the first argument if it is non- null and otherwise returns the non- null second argument.
StringtoString(Object o, String nullDefault)
Returns the result of calling toString on the first argument if the first argument is not null and returns the second argument otherwise.
StringtoString(Object o)
Returns the result of calling toString for a non- null argument and "null" for a null argument.