public class StringUtil extends Object
Modifier and Type | Field and Description |
---|---|
static String |
PROPERTY_DEFAULT_SEPARATOR |
Constructor and Description |
---|
StringUtil() |
Modifier and Type | Method and Description |
---|---|
static String |
decode(String maskedString,
String salt,
int iterationCount)
Given a masked password
String , decode it |
static String |
getSystemPropertyAsString(String str)
Get the system property value if the string is of the format ${sysproperty}
|
static boolean |
isNotNull(String str)
Check whether the passed string is null or empty
|
static boolean |
isNullOrEmpty(String str)
Check whether the string is null or empty
|
static void |
match(String first,
String second)
Match two strings else throw a
RuntimeException |
static List<String> |
tokenize(String str)
Given a comma separated string, get the tokens as a
List |
public static final String PROPERTY_DEFAULT_SEPARATOR
public static boolean isNotNull(String str)
str
- public static boolean isNullOrEmpty(String str)
str
- public static String getSystemPropertyAsString(String str)
Get the system property value if the string is of the format ${sysproperty}
You can insert default value when the system property is not set, by separating it at the beginning with ::
Examples:
${idp} should resolve to a value if the system property "idp" is set.
${idp::http://localhost:8080} will resolve to http://localhost:8080 if the system property "idp" is not set.
str
- public static void match(String first, String second)
RuntimeException
first
- second
- public static List<String> tokenize(String str)
List
str
- Copyright © 2018 JBoss by Red Hat. All rights reserved.