public class ObjectMethods extends Object
Object methods such as
Object.equals(Object) and Object.hashCode() for objects that
may be null.| Constructor and Description |
|---|
ObjectMethods() |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
equal(Object first,
Object second)
Checks whether the two objects are equal.
|
static int |
hashCode(Object object)
Calculates the hash code for the given object.
|
public static boolean equal(Object first, Object second)
first - The first objectsecond - The second objecttrue if the objects are equal (according to
Object.equals(Object)) or both nullpublic static int hashCode(Object object)
object - The object to get the hash code forCopyright © 2026. All rights reserved.