|
2.17.2: 2011-06-17 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.basedb.util.EqualsHelper
public class EqualsHelper
Helper class for implementing equals and hash code calculations in classes.
Constructor Summary | |
---|---|
EqualsHelper()
|
Method Summary | ||
---|---|---|
static boolean |
equals(Object o1,
Object o2)
Check if two objects are equal according to their equals implementation. |
|
static int |
hashCode(Object o)
Get the hashcode for an object. |
|
static
|
hashCode(T... objects)
Hashcode calculation for an array of objects that doesn't depend on the position in the array. |
|
static
|
invariantEquals(T[] a1,
T[] a2)
Checks if two arrays contains equal elements disregarding their positions in the array. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public EqualsHelper()
Method Detail |
---|
public static boolean equals(Object o1, Object o2)
o1
- The first objecto2
- The second object
public static int hashCode(Object o)
o
- The object to get the hash code for
public static <T> int hashCode(T... objects)
objects
- An array of objects
invariantEquals(Object[], Object[])
public static <T> boolean invariantEquals(T[] a1, T[] a2)
a1
- The first arraya2
- The second array
|
2.17.2: 2011-06-17 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |