Class ObjectUtils
java.lang.Object
org.eclipse.tracecompass.common.core.ObjectUtils
Utility methods for arbitrary objects.
- Since:
- 2.0
- Author:
- Patrick Tasse
-
Method Summary
Modifier and TypeMethodDescriptionstatic booleandeepEquals(@Nullable Object o1, @Nullable Object o2) Checks deep equality of two objects that may be arrays or collections.static intdeepHashCode(@Nullable Object o) Returns a hash code value for an object which may be an array or a collection.
-
Method Details
-
deepEquals
Checks deep equality of two objects that may be arrays or collections. The objects (and each of their respective elements, if applicable) must be of the same class to be considered equal. Deep equality is recursively called on each element of an array or collection, if applicable.- Parameters:
o1- the first object to compareo2- the second object to compare- Returns:
- true if the objects are deeply equal, false otherwise
-
deepHashCode
Returns a hash code value for an object which may be an array or a collection. The deep hash code is recursively computed for each element of an array or collection, if applicable.- Parameters:
o- the object- Returns:
- a hash code value for this object.
-