public final class Objects
extends java.lang.Object
Object.
See the Guava User Guide on writing
Object methods with Objects.
| Modifier and Type | Method and Description |
|---|---|
static boolean |
equal(java.lang.Object a,
java.lang.Object b)
Determines whether two possibly-null objects are equal.
|
public static boolean equal(java.lang.Object a,
java.lang.Object b)
true if a and b are both null.
true if a and b are both non-null and they are
equal according to Object.equals(Object).
false in all other situations.
This assumes that any non-null objects passed to this function conform
to the equals() contract.
Note for Java 7 and later: This method should be treated as
deprecated; use Objects.equals(java.lang.Object, java.lang.Object) instead.