|
fop 2.2 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.fop.util.CompareUtil
public final class CompareUtil
A utility class that provides helper methods for implementing equals and hashCode.
Method Summary | |
---|---|
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
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 object
public static int getHashCode(java.lang.Object object)
object
- an object
public static boolean equal(double n1, double n2)
Double.equals(Object)
method.
n1
- a numbern2
- another number
public static int getHashCode(double number)
Double.hashCode()
method.
number
- a number
|
fop 2.2 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |