public final class CompareUtil
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static boolean |
equal(double n1,
double n2)
Compares two numbers for equality.
|
static boolean |
equal(java.lang.Object o1,
java.lang.Object o2)
Compares two objects for equality.
|
static int |
getHashCode(double number)
Returns a hash code for the given number.
|
static int |
getHashCode(java.lang.Object object)
Returns the hash code of the given object.
|
public static boolean equal(java.lang.Object o1,
java.lang.Object o2)
Object.equals(Object) method of the object
with the lower hash code (System.identityHashCode(Object));
in the rare case that two different objects have the same hash code, a lock
is used.o1 - an objecto2 - another objectpublic static int getHashCode(java.lang.Object object)
object - an objectpublic static boolean equal(double n1,
double n2)
Double.equals(Object) method.n1 - a numbern2 - another numberpublic static int getHashCode(double number)
Double.hashCode() method.number - a numberCopyright 1999-2022 The Apache Software Foundation. All Rights Reserved.