|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.shibboleth.utilities.java.support.primitive.StringSupport
public final class StringSupport
String utility methods.
| Constructor Summary | |
|---|---|
private |
StringSupport()
Constructor. |
| Method Summary | |
|---|---|
static String |
listToStringValue(List<String> values,
String delimiter)
Converts a List of strings into a single string, with values separated by a specified delimiter. |
static List<String> |
stringToList(String string,
String delimiter)
Converts a delimited string into a list. |
static String |
trim(String s)
Safely trims a string. |
static String |
trimOrNull(String s)
Safely trims a string and, if empty, converts it to null. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
private StringSupport()
| Method Detail |
|---|
@Nonnull
public static String listToStringValue(@Nonnull
List<String> values,
@Nonnull
String delimiter)
values - list of stringsdelimiter - the delimiter used between values
@Nonnull
public static List<String> stringToList(@Nonnull
String string,
@Nonnull
String delimiter)
string - the string to be split into a listdelimiter - the delimiter between values. This string may contain multiple delimiter characters, as allowed
by StringTokenizer
@Nullable
public static String trim(@Nullable
String s)
s - the string to trim, may be null
@Nullable
public static String trimOrNull(@Nullable
String s)
s - the string to trim, may be null
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||