Constructors Summary |
---|
public RegexFileFilter(String pattern)Construct a new regular expression filter.
if (pattern == null) {
throw new IllegalArgumentException("Pattern is missing");
}
this.pattern = Pattern.compile(pattern);
|
public RegexFileFilter(String pattern, IOCase caseSensitivity)Construct a new regular expression filter with the specified flags case sensitivity.
if (pattern == null) {
throw new IllegalArgumentException("Pattern is missing");
}
int flags = 0;
if (caseSensitivity != null && !caseSensitivity.isCaseSensitive()) {
flags = Pattern.CASE_INSENSITIVE;
}
this.pattern = Pattern.compile(pattern, flags);
|
public RegexFileFilter(String pattern, int flags)Construct a new regular expression filter with the specified flags.
if (pattern == null) {
throw new IllegalArgumentException("Pattern is missing");
}
this.pattern = Pattern.compile(pattern, flags);
|
public RegexFileFilter(Pattern pattern)Construct a new regular expression filter for a compiled regular expression
if (pattern == null) {
throw new IllegalArgumentException("Pattern is missing");
}
this.pattern = pattern;
|