1
2
3
4
5 package com.qulice.maven;
6
7 import com.google.common.base.Predicate;
8 import java.util.Collection;
9
10
11
12
13
14
15 final class ExcludePredicate implements Predicate<String> {
16
17
18
19
20 private final Collection<String> excludes;
21
22
23
24
25
26
27 ExcludePredicate(final Collection<String> excludes) {
28 this.excludes = excludes;
29 }
30
31 @Override
32 public boolean apply(final String name) {
33 boolean ignore = false;
34 for (final String exclude : this.excludes) {
35 if (name.startsWith(exclude)) {
36 ignore = true;
37 break;
38 }
39 }
40 return ignore;
41 }
42 }