/** * Expands a string according to {@link #expandGlob(String)}, and then constructs a {@link WildcardPath} * for each expanded result which can be used to match strings as described in {@link WildcardPath}. * * @param globPattern a String to be passed to {@link #expandGlob(String)} * @param delim the delimeter used by {@link WildcardPath} * @return a list of wildcard paths, one for each expanded result */ public static List<WildcardPath> expandGlobToWildCardPaths(String globPattern, char delim) { List<WildcardPath> ret = new ArrayList<WildcardPath>(); for (String expandedGlob : Strings.expandGlob(globPattern)) { ret.add(new WildcardPath(globPattern, expandedGlob, delim)); } return ret; } }
/** * Expands a string according to {@link #expandGlob(String)}, and then constructs a {@link WildcardPath} * for each expanded result which can be used to match strings as described in {@link WildcardPath}. * * @param globPattern a String to be passed to {@link #expandGlob(String)} * @param delim the delimeter used by {@link WildcardPath} * @return a list of wildcard paths, one for each expanded result */ public static List<WildcardPath> expandGlobToWildCardPaths(String globPattern, char delim) { List<WildcardPath> ret = new ArrayList<WildcardPath>(); for (String expandedGlob : Strings.expandGlob(globPattern)) { ret.add(new WildcardPath(globPattern, expandedGlob, delim)); } return ret; } }