Class ValidationUtils
java.lang.Object
com.amazonaws.util.ValidationUtils
Useful utilities to validate dependencies
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidassertAllAreNull(String messageIfNull, Object... objects) Asserts that all of the objects are null.static <T> TassertNotNull(T object, String fieldName) Asserts that the given object is non-null and returns it.
-
Constructor Details
-
ValidationUtils
public ValidationUtils()
-
-
Method Details
-
assertNotNull
Asserts that the given object is non-null and returns it.- Parameters:
object- Object to assert onfieldName- Field name to display in exception message if null- Returns:
- Object if non null
- Throws:
IllegalArgumentException- If object was null
-
assertAllAreNull
public static void assertAllAreNull(String messageIfNull, Object... objects) throws IllegalArgumentException Asserts that all of the objects are null.- Throws:
IllegalArgumentException- if any object provided was NOT null.
-