@Test public void doesntMatchWithoutPattern() { assertFalse(blacklist.matches(Paths.get("filename"))); }
@Override public boolean matches(Path path) { for (int i = 0; i < path.getNameCount(); i++) { for (Pattern pattern : patterns) { if (pattern.matcher(path.getName(i).toString()).matches()) { return true; } } } return false; }
PatternBlacklist implements Blacklist { @Override public boolean matches(Path path) { for (int i = 0; i < path.getNameCount(); i++) { for (Pattern pattern : patterns) { if (pattern.matcher(path.getName(i).toString()).matches()) { return true; } } } return false; } }
PatternBlacklist implements Blacklist { @Override public boolean matches(Path path) { for (int i = 0; i < path.getNameCount(); i++) { for (Pattern pattern : patterns) { if (pattern.matcher(path.getName(i).toString()).matches()) { return true; } } } return false; }  }
PatternBlacklist implements Blacklist { @Override public boolean matches(Path path) { for (int i = 0; i < path.getNameCount(); i++) { for (Pattern pattern : patterns) { if (pattern.matcher(path.getName(i).toString()).matches()) { return true; } } } return false; }  @Override boolean matches(Path path); void add(Pattern pattern); }
PatternBlacklist implements Blacklist { @Override public boolean matches(Path path) { for (int i = 0; i < path.getNameCount(); i++) { for (Pattern pattern : patterns) { if (pattern.matcher(path.getName(i).toString()).matches()) { return true; } } } return false; }  @Override boolean matches(Path path); void add(Pattern pattern);  }