Class ObjectsUtils

java.lang.Object
com.rollbar.notifier.util.ObjectsUtils

public class ObjectsUtils extends Object
Helper class that provides Java 7 features.
  • Constructor Details

    • ObjectsUtils

      public ObjectsUtils()
  • Method Details

    • equals

      public static boolean equals(Object object1, Object object2)
    • hash

      public static int hash(Object... objects)
    • requireNonNull

      public static <T> T requireNonNull(T object, String errorMessage)
      Checks that the specified object reference is not null.
      Type Parameters:
      T - the type of the reference
      Parameters:
      object - the object reference to check for nullity
      errorMessage - detail message to be used in the event that a NullPointerException is thrown
      Returns:
      object if not null
    • close

      public static void close(Closeable closeable)
      Closes stream if possible.
      Parameters:
      closeable - the closable implementation to close