Package org.identityconnectors.common
Class Assertions
java.lang.Object
org.identityconnectors.common.Assertions
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
blankCheck
(String o, String param) static String
blankChecked
(String o, String param) ThrowsIllegalArgumentException
if the parametero
isnull
or blank, otherwise returns the value of theo
parameter.static void
static <T> T
nullChecked
(T o, String param) ThrowsNullPointerException
if the parametero
isnull
, otherwise returns the value of theo
parameter.
-
Method Details
-
nullCheck
- Parameters:
o
- check if the object isnull
.param
- name of the parameter to check fornull
.- Throws:
NullPointerException
- ifo
isnull
and constructs a message with the name of the parameter.
-
nullChecked
ThrowsNullPointerException
if the parametero
isnull
, otherwise returns the value of theo
parameter.- Type Parameters:
T
- the type of the value- Parameters:
o
- check if the object isnull
.param
- name of the parameter to check fornull
.- Returns:
- the value of the
o
parameter. - Throws:
NullPointerException
- ifo
isnull
and constructs a message with the name of the parameter.- Since:
- 1.1
-
blankCheck
- Parameters:
o
- value to test for blank.param
- name of the parameter to check.
-
blankChecked
ThrowsIllegalArgumentException
if the parametero
isnull
or blank, otherwise returns the value of theo
parameter.- Parameters:
o
- value to test for blank.param
- name of the parameter to check.- Returns:
- the value of the
o
parameter. - Since:
- 1.1
-