Class ObjectUtils

java.lang.Object
org.eclipse.tracecompass.common.core.ObjectUtils

public final class ObjectUtils extends Object
Utility methods for arbitrary objects.
Since:
2.0
Author:
Patrick Tasse
  • Method Details

    • deepEquals

      public static boolean deepEquals(@Nullable Object o1, @Nullable Object o2)
      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 compare
      o2 - the second object to compare
      Returns:
      true if the objects are deeply equal, false otherwise
    • deepHashCode

      public static int deepHashCode(@Nullable Object o)
      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.