Package org.ametys.core.util
Class StringUtils
- java.lang.Object
-
- org.ametys.core.util.StringUtils
-
public final class StringUtils extends Object
A collection of String management utility methods.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static String
generateKey()
Generates a unique String key, based on System.currentTimeMillis()static String
md5Base64(String password)
Encrypt a password by using first MD5 Hash and base64 encoding.static Collection<String>
stringToCollection(String values)
Extract String values from a comma seprated list.static String[]
stringToStringArray(String values)
Extract String values from a comma seprated list.
-
-
-
Method Detail
-
stringToCollection
public static Collection<String> stringToCollection(String values)
Extract String values from a comma seprated list.- Parameters:
values
- the comma separated list- Returns:
- a collection of String or an empty collection if string is null or empty.
-
stringToStringArray
public static String[] stringToStringArray(String values)
Extract String values from a comma seprated list.- Parameters:
values
- the comma separated list- Returns:
- an array of String
-
generateKey
public static String generateKey()
Generates a unique String key, based on System.currentTimeMillis()- Returns:
- a unique String value
-
-