Package com.auth0.utils
Class Asserts
java.lang.Object
com.auth0.utils.Asserts
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidassertNotEmpty(Collection<?> value, String name) Asserts that a collection is not null and has at least one item.static voidassertNotNull(Object value, String name) Asserts that an object is not null.static voidassertValidUrl(String value, String name) Asserts that a value is a valid URL.
-
Constructor Details
-
Asserts
public Asserts()
-
-
Method Details
-
assertNotNull
Asserts that an object is not null.- Parameters:
value- the value to check.name- the name of the parameter, used when creating the exception message.- Throws:
IllegalArgumentException- if the value is null
-
assertValidUrl
Asserts that a value is a valid URL.- Parameters:
value- the value to check.name- the name of the parameter, used when creating the exception message.- Throws:
IllegalArgumentException- if the value is null or is not a valid URL.
-
assertNotEmpty
Asserts that a collection is not null and has at least one item.- Parameters:
value- the value to check.name- the name of the parameter, used when creating the exception message.- Throws:
IllegalArgumentException- if the value is null or has length of zero.
-