|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.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 booleans 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 bytes 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 chars 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 doubles 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 floats 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 ints 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 longs 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 Objects 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 shorts 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 booleanother - the second <boolean
true if the booleans are equal,
<false otherwise
public static boolean isEqual(char own,
char other)
char equality check.
own - the first charother - the second char
true if the chars are equal,
false otherwise
public static boolean isEqual(byte own,
byte other)
byte equality check.
own - the first byteother - the second byte
true if the bytes are equal,
false otherwise
public static boolean isEqual(short own,
short other)
short equality check.
own - the first shortother - the second short
true if the shorts are equal,
false otherwise
public static boolean isEqual(int own,
int other)
int equality check.
own - the first intother - the second int
true if the ints are equal,
false otherwise
public static boolean isEqual(long own,
long other)
long equality check.
own - the first longother - the second long
true if the longs are equal,
false otherwise
public static boolean isEqual(float own,
float other)
float equality check.
own - the first floatother - the second float
true if the floats are equal,
false otherwise
public static boolean isEqual(double own,
double other)
double equality check.
own - the first doubleother - the second double
true if the doubles are equal,
false otherwise
public static boolean isEqual(@Nullable
Object own,
@Nullable
Object other)
Object equality check.
own - the first Objectother - the second Object
true if the Objects are equal,
false otherwise
public static boolean isEqual(@Nullable
boolean[] own,
@Nullable
boolean[] other)
boolean array equality check.
own - the first array of booleansother - the second array of booleans
true if the two boolean arrays are
equal, false otherwise
public static boolean isEqual(@Nullable
char[] own,
@Nullable
char[] other)
char array equality check.
own - the first array of charsother - the second array of chars
true if the two char arrays are
equal, false otherwise
public static boolean isEqual(@Nullable
byte[] own,
@Nullable
byte[] other)
byte array equality check.
own - the first array of bytesother - the second array of bytes
true if the two byte arrays are
equal, false otherwise
public static boolean isEqual(@Nullable
short[] own,
@Nullable
short[] other)
short array equality check.
own - the first array of shortsother - the second array of shorts
true if the two short arrays are
equal, false otherwise
public static boolean isEqual(@Nullable
int[] own,
@Nullable
int[] other)
int array equality check.
own - the first array of intsother - the second array of ints
true if the two int arrays are
equal, false otherwise
public static boolean isEqual(@Nullable
long[] own,
@Nullable
long[] other)
long array equality check.
own - the first array of longsother - the second array of longs
true if the two long arrays are
equal, false otherwise
public static boolean isEqual(@Nullable
float[] own,
@Nullable
float[] other)
float array equality check.
own - the first array of floatsother - the second array of floats
true if the two float arrays are
equal, false otherwise
public static boolean isEqual(@Nullable
double[] own,
@Nullable
double[] other)
double array equality check.
own - the first array of doublesother - the second array of doubles
true if the two double arrays are
equal, false otherwise
public static boolean isEqual(@Nullable
Object[] own,
@Nullable
Object[] other)
Object array equality check.
own - the first array of Objectsother - the second array of Objects
true if the two Object arrays are
equal, false otherwise
public 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)
Objects according to the rules stated in
"Effective Java" by Joshua Bloch.
arr - the array of Objects to compute the hash code for
public static int hash(@Nullable
boolean[] arr)
booleans according to the rules stated in
"Effective Java" by Joshua Bloch.
arr - the array of booleans to compute the hash code
public static int hash(@Nullable
byte[] arr)
bytes according to the rules stated in
"Effective Java" by Joshua Bloch.
arr - the array of bytes to compute the hash code for
public static int hash(@Nullable
char[] arr)
chars according to the rules stated in
"Effective Java" by Joshua Bloch.
arr - the array of chars to compute the hash code for
public static int hash(@Nullable
short[] arr)
shorts according to the rules stated in
"Effective Java" by Joshua Bloch.
arr - the array of shorts to compute the hash code for
public static int hash(@Nullable
int[] arr)
ints according to the rules stated in
"Effective Java" by Joshua Bloch.
arr - the array of ints to compute the hash code for
public static int hash(@Nullable
long[] arr)
longs according to the rules stated in
"Effective Java" by Joshua Bloch.
arr - the array of longs to compute the hash code for
public static int hash(@Nullable
float[] arr)
floats according to the rules stated in
"Effective Java" by Joshua Bloch.
arr - the array of floats to compute the hash code for
public static int hash(@Nullable
double[] arr)
doubles according to the rules stated in
"Effective Java" by Joshua Bloch.
arr - the array of doubles to compute the hash code for
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||