|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.eos.util.EqualsAndHashUtil
public final class EqualsAndHashUtil
Utility class to support Object.equals(Object)
and Object.hashCode()
method implementation.
Method Summary | |
---|---|
static int |
hash(boolean bool)
Creates a hash code for the given boolean according to the rules stated in "Effective
Java" by Joshua Bloch. |
static int |
hash(boolean[] arr)
Creates a hash code for the given array of boolean s according to the rules stated in
"Effective Java" by Joshua Bloch. |
static int |
hash(byte b)
Creates a hash code for the given byte according to the rules stated in "Effective
Java" by Joshua Bloch. |
static int |
hash(byte[] arr)
Creates a hash code for the given array of byte s according to the rules stated in
"Effective Java" by Joshua Bloch. |
static int |
hash(char c)
Creates a hash code for the given char according to the rules stated in "Effective
Java" by Joshua Bloch. |
static int |
hash(char[] arr)
Creates a hash code for the given array of char s according to the rules stated in
"Effective Java" by Joshua Bloch. |
static int |
hash(double d)
Creates a hash code for the given double according to the rules stated in "Effective
Java" by Joshua Bloch. |
static int |
hash(double[] arr)
Creates a hash code for the given array of double s according to the rules stated in
"Effective Java" by Joshua Bloch. |
static int |
hash(float f)
Creates a hash code for the given float according to the rules stated in "Effective
Java" by Joshua Bloch. |
static int |
hash(float[] arr)
Creates a hash code for the given array of float s according to the rules stated in
"Effective Java" by Joshua Bloch. |
static int |
hash(int i)
Creates a hash code for the given int according to the rules stated in "Effective
Java" by Joshua Bloch. |
static int |
hash(int[] arr)
Creates a hash code for the given array of int s according to the rules stated in
"Effective Java" by Joshua Bloch. |
static int |
hash(long l)
Creates a hash code for the given long according to the rules stated in "Effective
Java" by Joshua Bloch. |
static int |
hash(long[] arr)
Creates a hash code for the given array of long s according to the rules stated in
"Effective Java" by Joshua Bloch. |
static int |
hash(Object obj)
Creates a hash code for the given Object according to the rules stated in "Effective
Java" by Joshua Bloch. |
static int |
hash(Object[] arr)
Creates a hash code for the given array of Object s according to the rules stated in
"Effective Java" by Joshua Bloch. |
static int |
hash(short s)
Creates a hash code for the given short according to the rules stated in "Effective
Java" by Joshua Bloch. |
static int |
hash(short[] arr)
Creates a hash code for the given array of short s according to the rules stated in
"Effective Java" by Joshua Bloch. |
static boolean |
isEqual(boolean[] own,
boolean[] other)
boolean array equality check. |
static boolean |
isEqual(boolean own,
boolean other)
boolean equality check. |
static boolean |
isEqual(byte[] own,
byte[] other)
byte array equality check. |
static boolean |
isEqual(byte own,
byte other)
byte equality check. |
static boolean |
isEqual(char[] own,
char[] other)
char array equality check. |
static boolean |
isEqual(char own,
char other)
char equality check. |
static boolean |
isEqual(double[] own,
double[] other)
double array equality check. |
static boolean |
isEqual(double own,
double other)
double equality check. |
static boolean |
isEqual(float[] own,
float[] other)
float array equality check. |
static boolean |
isEqual(float own,
float other)
float equality check. |
static boolean |
isEqual(int[] own,
int[] other)
int array equality check. |
static boolean |
isEqual(int own,
int other)
int equality check. |
static boolean |
isEqual(long[] own,
long[] other)
long array equality check. |
static boolean |
isEqual(long own,
long other)
long equality check. |
static boolean |
isEqual(Object[] own,
Object[] other)
Object array equality check. |
static boolean |
isEqual(Object own,
Object other)
Object equality check. |
static boolean |
isEqual(short[] own,
short[] other)
short array equality check. |
static boolean |
isEqual(short own,
short other)
short equality check. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static boolean isEqual(boolean own, boolean other)
boolean
equality check.
own
- the first boolean
other
- the second <boolean
true
if the boolean
s are equal,
<false
otherwisepublic static boolean isEqual(char own, char other)
char
equality check.
own
- the first char
other
- the second char
true
if the char
s are equal,
false
otherwisepublic static boolean isEqual(byte own, byte other)
byte
equality check.
own
- the first byte
other
- the second byte
true
if the byte
s are equal,
false
otherwisepublic static boolean isEqual(short own, short other)
short
equality check.
own
- the first short
other
- the second short
true
if the short
s are equal,
false
otherwisepublic static boolean isEqual(int own, int other)
int
equality check.
own
- the first int
other
- the second int
true
if the int
s are equal,
false
otherwisepublic static boolean isEqual(long own, long other)
long
equality check.
own
- the first long
other
- the second long
true
if the long
s are equal,
false
otherwisepublic static boolean isEqual(float own, float other)
float
equality check.
own
- the first float
other
- the second float
true
if the float
s are equal,
false
otherwisepublic static boolean isEqual(double own, double other)
double
equality check.
own
- the first double
other
- the second double
true
if the double
s are equal,
false
otherwisepublic static boolean isEqual(@Nullable Object own, @Nullable Object other)
Object
equality check.
own
- the first Object
other
- the second Object
true
if the Object
s are equal,
false
otherwisepublic static boolean isEqual(@Nullable boolean[] own, @Nullable boolean[] other)
boolean
array equality check.
own
- the first array of boolean
sother
- the second array of boolean
s
true
if the two boolean
arrays are
equal, false
otherwisepublic static boolean isEqual(@Nullable char[] own, @Nullable char[] other)
char
array equality check.
own
- the first array of char
sother
- the second array of char
s
true
if the two char
arrays are
equal, false
otherwisepublic static boolean isEqual(@Nullable byte[] own, @Nullable byte[] other)
byte
array equality check.
own
- the first array of byte
sother
- the second array of byte
s
true
if the two byte
arrays are
equal, false
otherwisepublic static boolean isEqual(@Nullable short[] own, @Nullable short[] other)
short
array equality check.
own
- the first array of short
sother
- the second array of short
s
true
if the two short
arrays are
equal, false
otherwisepublic static boolean isEqual(@Nullable int[] own, @Nullable int[] other)
int
array equality check.
own
- the first array of int
sother
- the second array of int
s
true
if the two int
arrays are
equal, false
otherwisepublic static boolean isEqual(@Nullable long[] own, @Nullable long[] other)
long
array equality check.
own
- the first array of long
sother
- the second array of long
s
true
if the two long
arrays are
equal, false
otherwisepublic static boolean isEqual(@Nullable float[] own, @Nullable float[] other)
float
array equality check.
own
- the first array of float
sother
- the second array of float
s
true
if the two float
arrays are
equal, false
otherwisepublic static boolean isEqual(@Nullable double[] own, @Nullable double[] other)
double
array equality check.
own
- the first array of double
sother
- the second array of double
s
true
if the two double
arrays are
equal, false
otherwisepublic static boolean isEqual(@Nullable Object[] own, @Nullable Object[] other)
Object
array equality check.
own
- the first array of Object
sother
- the second array of Object
s
true
if the two Object
arrays are
equal, false
otherwisepublic static int hash(@Nullable Object obj)
Object
according to the rules stated in "Effective
Java" by Joshua Bloch.
obj
- the object to compute the hash code for
public static int hash(boolean bool)
boolean
according to the rules stated in "Effective
Java" by Joshua Bloch.
bool
- the object to compute the hash code for
public static int hash(byte b)
byte
according to the rules stated in "Effective
Java" by Joshua Bloch.
b
- the object to compute the hash code for
public static int hash(char c)
char
according to the rules stated in "Effective
Java" by Joshua Bloch.
c
- the object to compute the hash code for
public static int hash(short s)
short
according to the rules stated in "Effective
Java" by Joshua Bloch.
s
- the object to compute the hash code for
public static int hash(int i)
int
according to the rules stated in "Effective
Java" by Joshua Bloch.
i
- the object to compute the hash code for
public static int hash(long l)
long
according to the rules stated in "Effective
Java" by Joshua Bloch.
l
- the object to compute the hash code for
public static int hash(float f)
float
according to the rules stated in "Effective
Java" by Joshua Bloch.
f
- the object to compute the hash code for
public static int hash(double d)
double
according to the rules stated in "Effective
Java" by Joshua Bloch.
d
- the object to compute the hash code for
public static int hash(@Nullable Object[] arr)
Object
s according to the rules stated in
"Effective Java" by Joshua Bloch.
arr
- the array of Object
s to compute the hash code for
public static int hash(@Nullable boolean[] arr)
boolean
s according to the rules stated in
"Effective Java" by Joshua Bloch.
arr
- the array of boolean
s to compute the hash code
public static int hash(@Nullable byte[] arr)
byte
s according to the rules stated in
"Effective Java" by Joshua Bloch.
arr
- the array of byte
s to compute the hash code for
public static int hash(@Nullable char[] arr)
char
s according to the rules stated in
"Effective Java" by Joshua Bloch.
arr
- the array of char
s to compute the hash code for
public static int hash(@Nullable short[] arr)
short
s according to the rules stated in
"Effective Java" by Joshua Bloch.
arr
- the array of short
s to compute the hash code for
public static int hash(@Nullable int[] arr)
int
s according to the rules stated in
"Effective Java" by Joshua Bloch.
arr
- the array of int
s to compute the hash code for
public static int hash(@Nullable long[] arr)
long
s according to the rules stated in
"Effective Java" by Joshua Bloch.
arr
- the array of long
s to compute the hash code for
public static int hash(@Nullable float[] arr)
float
s according to the rules stated in
"Effective Java" by Joshua Bloch.
arr
- the array of float
s to compute the hash code for
public static int hash(@Nullable double[] arr)
double
s according to the rules stated in
"Effective Java" by Joshua Bloch.
arr
- the array of double
s to compute the hash code for
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |