@Test public void testEmpty() throws InvalidPatternException { assertTrue(WildcardGlobs.isGlobMatched("a{,?}{,b}", "a")); assertTrue(WildcardGlobs.isGlobMatched("a{,?}{,b}", "ab")); assertTrue(WildcardGlobs.isGlobMatched("a{,?}{,b}", "ac")); assertTrue(WildcardGlobs.isGlobMatched("a{,?}{,b}", "acb")); assertFalse(WildcardGlobs.isGlobMatched("a{,?}{,b}", "abc")); assertFalse(WildcardGlobs.isGlobMatched("a{,?}{,b}", "accb")); }
public static boolean isGlobMatched(String globPattern, String targetText) throws InvalidPatternException { List<String> patterns = getGlobsAfterBraceExpansion(globPattern); for (String p : patterns) { if (isNoBraceGlobMatched(p, targetText)) return true; } return false; }
WildcardGlobs { public static boolean isGlobMatched(String globPattern, String targetText) throws InvalidPatternException { List<String> patterns = getGlobsAfterBraceExpansion(globPattern); for (String p : patterns) { if (isNoBraceGlobMatched(p, targetText)) return true; } return false; } }
WildcardGlobs { public static boolean isGlobMatched(String globPattern, String targetText) throws InvalidPatternException { List<String> patterns = getGlobsAfterBraceExpansion(globPattern); for (String p : patterns) { if (isNoBraceGlobMatched(p, targetText)) return true; } return false; }  }
WildcardGlobs { public static boolean isGlobMatched(String globPattern, String targetText) throws InvalidPatternException { List<String> patterns = getGlobsAfterBraceExpansion(globPattern); for (String p : patterns) { if (isNoBraceGlobMatched(p, targetText)) return true; } return false; }  static boolean isGlobMatched(String globPattern, String targetText); static boolean isNoBraceGlobMatched(String globPattern, String target); static List<String> getGlobsAfterBraceExpansion(String pattern); static List<String> getGlobsAfterBraceExpansion(String pattern, boolean allowNumericRanges, PhraseTreatment quoteTreatment, PhraseTreatment parenthesesTreatment); }
WildcardGlobs { public static boolean isGlobMatched(String globPattern, String targetText) throws InvalidPatternException { List<String> patterns = getGlobsAfterBraceExpansion(globPattern); for (String p : patterns) { if (isNoBraceGlobMatched(p, targetText)) return true; } return false; }  static boolean isGlobMatched(String globPattern, String targetText); static boolean isNoBraceGlobMatched(String globPattern, String target); static List<String> getGlobsAfterBraceExpansion(String pattern); static List<String> getGlobsAfterBraceExpansion(String pattern, boolean allowNumericRanges, PhraseTreatment quoteTreatment, PhraseTreatment parenthesesTreatment);  }