Package org.faktorips.runtime.internal
Class IpsStringUtils
java.lang.Object
org.faktorips.runtime.internal.IpsStringUtils
A collection of utility methods for Strings. We don't use a class library like apache-commons
here to minimize the dependencies for the generated code.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic final booleanReturnstrueifsis eithernull, the empty string or a string that only contains whitespace, otherwisefalse.static final booleanReturnstrueifsis eithernullor the empty string, otherwisefalse.static final booleanisNotBlank(String s) Returnstrueifsis neithernull, the empty string nor a string that only contains whitespace, otherwisefalse.static final booleanisNotEmpty(String s) Returnstrueifsis neithernullnor the empty string, otherwisefalse.static final Stringstatic final StringJoins the elements of the providedIterableinto a single String containing the provided elements with the given separator.static final <T> Stringstatic final <T> Stringstatic final StringJoins the elements of the provided array into a single String containing the provided elements with the default separator ", ".static final StringJoins the elements of the provided array into a single String containing the provided elements with the given separator.static final Stringjoin(Collection<?> collection, String separator) Joins the elements of the providedCollectioninto a single String containing the provided elements with the given separator.static final StringtoLowerFirstChar(String string)
-
Field Details
-
EMPTY
- See Also:
-
-
Method Details
-
isEmpty
Returnstrueifsis eithernullor the empty string, otherwisefalse. -
isNotEmpty
Returnstrueifsis neithernullnor the empty string, otherwisefalse. -
isBlank
Returnstrueifsis eithernull, the empty string or a string that only contains whitespace, otherwisefalse. -
isNotBlank
Returnstrueifsis neithernull, the empty string nor a string that only contains whitespace, otherwisefalse. -
join
Joins the elements of the providedCollectioninto a single String containing the provided elements with the given separator. No delimiter is added before or after the list.- Parameters:
collection- the Collection of values to join together, may benullseparator- the separator to use,nulltreated as ""- Returns:
- the joined String, empty if the collection is
null
-
join
Joins the elements of the providedIterableinto a single String containing the provided elements with the given separator. No delimiter is added before or after the list.- Parameters:
iterable- the Collection of values to join together, may benullseparator- the separator to use,nulltreated as ""- Returns:
- the joined String, empty if the collection is
null
-
join
Joins the elements of the providedIterableinto a single String containing the provided elements with the default separator ", ". No delimiter is added before or after the list.- Parameters:
iterable- the Collection of values to join together, may benull- Returns:
- the joined String, empty if the collection is
null
-
join
Joins the elements of the provided array into a single String containing the provided elements with the default separator ", ". No delimiter is added before or after the list.- Parameters:
objectArray- the array of values to join together, may benull- Returns:
- the joined String, empty if the collection is
null
-
join
Joins the elements of the provided array into a single String containing the provided elements with the given separator. No delimiter is added before or after the list.- Parameters:
objectArray- the array of values to join together, may benullseparator- the separator to use,nulltreated as ""- Returns:
- the joined String, empty if the collection is
null
-
join
-
join
public static final <T> String join(Iterable<T> iterable, Function<? super T, String> toString, String separator) -
toLowerFirstChar
-