public class CommonUtils extends Object
| Modifier and Type | Method and Description |
|---|---|
static void |
checkArgument(boolean expression,
Object errorMessage)
Check argument, if the expression is false then throw
IllegalArgumentException. |
static boolean |
isBlank(CharSequence cs)
Checks if a CharSequence is whitespace, empty ("") or null.
|
static Properties |
mapsToPropertiesConverted(Map<String,String>... configurations)
Util method to convert
Map entries into Properties. |
public static void checkArgument(boolean expression,
Object errorMessage)
IllegalArgumentException.expression - expression to checkerrorMessage - error message to throw if expression is falsepublic static boolean isBlank(CharSequence cs)
Checks if a CharSequence is whitespace, empty ("") or null.
StringUtils.isBlank(null) = true
StringUtils.isBlank("") = true
StringUtils.isBlank(" ") = true
StringUtils.isBlank("bob") = false
StringUtils.isBlank(" bob ") = false
cs - the CharSequence to check, may be nulltrue if the CharSequence is null, empty or whitespacepublic static Properties mapsToPropertiesConverted(Map<String,String>... configurations)
Map entries into Properties.configurations - map like configurationsCopyright © 2017 SDL Group. All rights reserved.