Package org.apache.parquet
Class Strings
java.lang.Object
org.apache.parquet.Strings
-
Method Summary
Modifier and TypeMethodDescriptionexpandGlob(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 toexpandGlob(String), and then constructs aWildcardPathfor each expanded result which can be used to match strings as described inWildcardPath.static booleanReturns true if s.isEmpty() or s == nullstatic StringDeprecated.static StringDeprecated.static StringDeprecated.
-
Method Details
-
join
Deprecated.Join an Iterable of Strings into a single string with a delimiter. For example, join(Arrays.asList("foo","","bar","x"), "|") would return "foo||bar|x"- Parameters:
s- an iterable of stringson- the delimiter- Returns:
- a single joined string
-
join
Deprecated.Join an Iterator of Strings into a single string with a delimiter. For example, join(Arrays.asList("foo","","bar","x"), "|") would return "foo||bar|x"- Parameters:
iter- an iterator of stringson- the delimiter- Returns:
- a single joined string
-
join
Deprecated.Join an Array of Strings into a single string with a delimiter. For example, join(new String[] {"foo","","bar","x"}, "|") would return "foo||bar|x"- Parameters:
s- an iterable of stringson- the delimiter- Returns:
- a single joined string
-
isNullOrEmpty
Returns true if s.isEmpty() or s == null- Parameters:
s- a string that may be null or empty- Returns:
- true if the string s is null or is empty
-
expandGlob
Expands a string with braces ("{}") into all of its possible permutations. We call anything inside of {} braces a "one-of" group.The only special characters in this glob syntax are '}', '{' and ','
The top-level pattern must not contain any commas, but a "one-of" group separates its elements with commas, and a one-of group may contain sub one-of groups.
For example: start{a,b,c}end -> startaend, startbend, startcend start{a,{b,c},d} -> startaend, startbend, startcend, startdend {a,b,c} -> a, b, c start{a, b{x,y}} -> starta, startbx, startby
- Parameters:
globPattern- a string in the format described above- Returns:
- a list of all the strings that would satisfy globPattern, including duplicates
-
expandGlobToWildCardPaths
Expands a string according toexpandGlob(String), and then constructs aWildcardPathfor each expanded result which can be used to match strings as described inWildcardPath.- Parameters:
globPattern- a String to be passed toexpandGlob(String)delim- the delimeter used byWildcardPath- Returns:
- a list of wildcard paths, one for each expanded result
-
String.join(CharSequence, Iterable)