|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.webmethods.caf.common.EqualsUtil
public final class EqualsUtil
The following utility class allows simple construction of an effective equals method. It is based on the recommendations of Effective Java, by Joshua Bloch.
Constructor Summary | |
---|---|
EqualsUtil()
|
Method Summary | |
---|---|
static boolean |
areEqual(boolean aThis,
boolean aThat)
Compares two boolean values |
static boolean |
areEqual(char aThis,
char aThat)
Compares two char values |
static boolean |
areEqual(double aThis,
double aThat)
Compares two double values |
static boolean |
areEqual(float aThis,
float aThat)
Compares two float values |
static boolean |
areEqual(long aThis,
long aThat)
Compares two long, byte, short or int values |
static boolean |
areEqual(Object aThis,
Object aThat)
Possibly-null object field. |
static boolean |
areEqualWithConstantTiming(String strA,
String strB)
MWS-7695: Use a constant time string comparison function to guard against timing attacks |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public EqualsUtil()
Method Detail |
---|
public static boolean areEqual(boolean aThis, boolean aThat)
aThis
- first boolean to be comparedaThat
- first boolean to be compared
public static boolean areEqual(char aThis, char aThat)
aThis
- first char to be comparedaThat
- first char to be compared
public static boolean areEqual(long aThis, long aThat)
aThis
- first value to be comparedaThat
- first value to be compared
public static boolean areEqual(float aThis, float aThat)
aThis
- first float to be comparedaThat
- first float to be compared
public static boolean areEqual(double aThis, double aThat)
aThis
- first double to be comparedaThat
- second double to be compared
public static boolean areEqual(Object aThis, Object aThat)
public static boolean areEqualWithConstantTiming(String strA, String strB)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |