@Service public class StringUtils extends Object
| Constructor and Description |
|---|
StringUtils() |
| Modifier and Type | Method and Description |
|---|---|
String |
emptyIfNull(String input)
Returns an empty string if null - helps to avoid NPE
|
String |
getMd5String(String input)
Get an MD5 sequence from a string
|
boolean |
isStringInList(List<String> stringList,
String toSearch)
Verifies if a list of strings contains a given one
|
String |
listAsString(List<String> stringList)
Provide a string with a comma separated
|
public String emptyIfNull(String input)
input - - String to verifypublic String listAsString(List<String> stringList)
stringList - - List of stringspublic String getMd5String(String input) throws NoSuchAlgorithmException
input - - String to encodeNoSuchAlgorithmExceptionCopyright © 2014. All Rights Reserved.