public final class Strings extends Object
| Modifier and Type | Method and Description |
|---|---|
static List<String> |
expandGlob(String globPattern)
Expands a string with braces ("{}") into all of its possible permutations.
|
static List<WildcardPath> |
expandGlobToWildCardPaths(String globPattern,
char delim)
Expands a string according to
expandGlob(String), and then constructs a WildcardPath
for each expanded result which can be used to match strings as described in WildcardPath. |
static boolean |
isNullOrEmpty(String s)
Returns true if s.isEmpty() or s == null
|
static String |
join(Iterable<String> s,
String on)
Join an Iterable of Strings into a single string with a delimiter.
|
static String |
join(Iterator<String> iter,
String on)
Join an Iterator of Strings into a single string with a delimiter.
|
static String |
join(String[] s,
String on)
Join an Array of Strings into a single string with a delimiter.
|
public static String join(Iterable<String> s, String on)
s - an iterable of stringson - the delimiterpublic static String join(Iterator<String> iter, String on)
iter - an iterator of stringson - the delimiterpublic static String join(String[] s, String on)
s - an iterable of stringson - the delimiterpublic static boolean isNullOrEmpty(String s)
s - a string that may be null or emptypublic static List<String> expandGlob(String globPattern)
globPattern - a string in the format described abovepublic static List<WildcardPath> expandGlobToWildCardPaths(String globPattern, char delim)
expandGlob(String), and then constructs a WildcardPath
for each expanded result which can be used to match strings as described in WildcardPath.globPattern - a String to be passed to expandGlob(String)delim - the delimeter used by WildcardPathCopyright © 2018 The Apache Software Foundation. All rights reserved.