public final class ObjectsCompat
extends java.lang.Object
static utility methods for operating
on objects.
This backports Objects which is available since API 19.| Modifier and Type | Method and Description |
|---|---|
static boolean |
equals(java.lang.Object a,
java.lang.Object b)
Returns
true if the arguments are equal to each other
and false otherwise. |
public static boolean equals(@Nullable
java.lang.Object a,
@Nullable
java.lang.Object b)
true if the arguments are equal to each other
and false otherwise.
Consequently, if both arguments are null, true
is returned and if exactly one argument is null, false is returned. Otherwise, equality is determined by using
the equals method of the first
argument.a - an objectb - an object to be compared with a for equalitytrue if the arguments are equal to each other
and false otherwiseObject.equals(Object)