Package com.auth0.utils
Class Asserts
java.lang.Object
com.auth0.utils.Asserts
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
assertNotEmpty
(Collection<?> value, String name) Asserts that a collection is not null and has at least one item.static void
assertNotNull
(Object value, String name) Asserts that an object is not null.static void
assertValidUrl
(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.
-