public class ObjectUtils extends java.lang.Object
| Constructor and Description |
|---|
ObjectUtils() |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
equals(java.lang.Object obj1,
java.lang.Object obj2)
Returns
true if the objects are equal or both null. |
static boolean |
equalsPaint(java.awt.Paint p1,
java.awt.Paint p2)
Returns
true if the two Paint objects are equal
OR both null. |
static int |
hashCode(java.lang.Object obj)
Returns the hash code of the object, or 0 if the object is
null. |
public ObjectUtils()
public static boolean equals(java.lang.Object obj1, java.lang.Object obj2)
true if the objects are equal or both null.obj1 - object 1 (null permitted).obj2 - object 2 (null permitted).public static int hashCode(java.lang.Object obj)
null. This method is provided in the Objects class in
Java 1.7, but you can use this one to run on Java 1.6.obj - (null permitted).public static boolean equalsPaint(java.awt.Paint p1, java.awt.Paint p2)
true if the two Paint objects are equal
OR both null. This method handles
GradientPaint, LinearGradientPaint and
RadialGradientPaint as a special cases, since those classes do
not override the equals() method.p1 - paint 1 (null permitted).p2 - paint 2 (null permitted).