|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jrdf.util.EqualsUtil
public final class EqualsUtil
A collection of methods that are used for equality testing. The general pattern is: 1/ Test if object (obj, the object passed in) is null, 2/ Test if the object is the same reference, 3/ Test if different class names (prevents subclasses from being equal) OR test if they have a different super class.
| Method Summary | |
|---|---|
static boolean |
differentClasses(Object thisObject,
Object obj)
Returns true if the two objects have classes with different values (unequal). |
static boolean |
hasSuperClassOrInterface(Class<?> requiredClassOrInterface,
Object obj)
Returns true if the given object can be cast to the superclass or interface. |
static boolean |
isNull(Object obj)
Return true if the given object is null. |
static boolean |
sameReference(Object thisObject,
Object obj)
Return true if the two objects are of the same reference. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static boolean isNull(Object obj)
obj - the object to test - who was passed into the equals method.
public static boolean sameReference(Object thisObject,
Object obj)
thisObject - the object to test - whose equals method we are in.obj - the object to test - who was passed into the equals method.
public static boolean differentClasses(Object thisObject,
Object obj)
thisObject - the object to test - whose equals method we are in.obj - the object to test - who was passed into the equals method.
public static boolean hasSuperClassOrInterface(Class<?> requiredClassOrInterface,
Object obj)
requiredClassOrInterface - the required superclass or interface.obj - the object to test - who was passed into the equals method.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||