|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.progeeks.util.ObjectUtils
public class ObjectUtils
Some general object-level utility methods to aid in meta-programming and such.
Constructor Summary | |
---|---|
ObjectUtils()
|
Method Summary | |
---|---|
static boolean |
areEqual(java.lang.Object o1,
java.lang.Object o2)
Returns true if the two objects are equal by reference or by .equals(). |
static void |
clearEquatableClasses()
Clears the list of classes marked as equatable. |
static void |
clearEquatableOverrides()
Clears the list of instances marked as equatable. |
static void |
clearEquatables()
Clears both classes and instances that have been marked as equatable. |
static java.lang.Object |
cloneObject(java.lang.Object obj)
Clones the specified object if it is cloneable and has a public clone() method. |
static java.util.List |
deepCloneList(java.util.List list)
Deep clones a list, iterating and cloning each list element |
static boolean |
isEquatable(java.lang.Class type)
Returns true if the specified class or its hierarchy has its own .equals() method instead of inheriting one from Object.class. |
static boolean |
isEquatable(java.lang.Object obj)
Returns true if the class of the specified object implements its own .equals() method. |
static void |
main(java.lang.String[] args)
|
static void |
markEquatable(java.lang.Class type)
Manually marks a class as equatable for future checks by the isEquatable method. |
static void |
markEquatable(java.lang.Object instance)
Manually marks an instance as equatable for future checks by the isEquatable(Object) method. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ObjectUtils()
Method Detail |
---|
public static java.lang.Object cloneObject(java.lang.Object obj)
public static java.util.List deepCloneList(java.util.List list)
list
-
public static boolean isEquatable(java.lang.Object obj)
public static boolean isEquatable(java.lang.Class type)
public static void markEquatable(java.lang.Class type)
public static void markEquatable(java.lang.Object instance)
public static void clearEquatableClasses()
public static void clearEquatableOverrides()
public static void clearEquatables()
public static boolean areEqual(java.lang.Object o1, java.lang.Object o2)
public static void main(java.lang.String[] args) throws java.lang.Exception
java.lang.Exception
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |