Package com.rollbar.notifier.util
Class ObjectsUtils
java.lang.Object
com.rollbar.notifier.util.ObjectsUtils
Helper class that provides Java 7 features.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidCloses stream if possible.static booleanstatic intstatic <T> TrequireNonNull(T object, String errorMessage) Checks that the specified object reference is not null.
-
Constructor Details
-
ObjectsUtils
public ObjectsUtils()
-
-
Method Details
-
equals
-
hash
-
requireNonNull
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 nullityerrorMessage- detail message to be used in the event that a NullPointerException is thrown- Returns:
- object if not null
-
close
Closes stream if possible.- Parameters:
closeable- the closable implementation to close
-