Package org.forgerock.api.util
Class ValidationUtil
java.lang.Object
org.forgerock.api.util.ValidationUtil
API Descriptor model-validation utilities.
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
Checks aString
for whitespace.static boolean
Determines if an array isnull
or zero-length.static boolean
Determines if aString
isnull
, or empty, or only contains whitespace.static boolean
isSingleNonNull
(Object... args) Checks that there is only a single single non-null
argument.static boolean
nullToFalse
(Boolean boolVal) Returns false if the given Boolean parameter isnull
.
-
Method Details
-
containsWhitespace
Checks aString
for whitespace.- Parameters:
s
-String
to validate- Returns:
true
if contains whitespace andfalse
otherwise
-
isEmpty
Determines if aString
isnull
, or empty, or only contains whitespace.- Parameters:
s
-String
to validate- Returns:
true
ifnull
or empty, or only contains whitespace, andfalse
otherwise
-
isEmpty
Determines if an array isnull
or zero-length.- Parameters:
a
- Array to validate- Returns:
true
ifnull
or empty, andfalse
otherwise
-
isSingleNonNull
Checks that there is only a single single non-null
argument.- Parameters:
args
- Arguments- Returns:
true
if there is a single non-null
argument, andfalse
otherwise
-
nullToFalse
Returns false if the given Boolean parameter isnull
.- Parameters:
boolVal
- boolean parameter to check- Returns:
false
if the parameter is null, and the parameter itself otherwise
-