Package org.apache.parquet.glob
Class GlobExpander
- java.lang.Object
-
- org.apache.parquet.glob.GlobExpander
-
public final class GlobExpander extends Object
Implementation ofStrings.expandGlob(String)
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static List<String>
expand(String globPattern)
Expands a string with braces ("{}") into all of its possible permutations.
-
-
-
Method Detail
-
expand
public static List<String> expand(String globPattern)
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
-
-