public final class IncludeExclude extends Glob
matches(java.lang.String)
Modifier and Type | Field and Description |
---|---|
static Glob |
DEFAULT_EXCLUDES
File names that one would typically exclude from file searches.
|
ANY, INCLUDES_EXCLUDES, NONE, REPLACEMENT
Constructor and Description |
---|
IncludeExclude() |
Modifier and Type | Method and Description |
---|---|
void |
addExclude(Glob exclude,
boolean override) |
void |
addInclude(Glob include,
boolean override) |
void |
appendExclude(Glob exclude)
Deprecated.
Equivalent with
addExclude(exclude, false) |
void |
appendInclude(Glob include)
Deprecated.
Equivalent with
addInclude(include, false) |
boolean |
matches(String subject)
All includes and excludes are matched against the subject.
|
void |
prependExclude(Glob exclude)
Deprecated.
Equivalent with
addExclude(exclude, true) |
void |
prependInclude(Glob include)
Deprecated.
Equivalent with
addInclude(include, true) |
String |
replace(String subject)
The subject is transformed by all matching includes, until an exclude matches.
|
String |
toString() |
and, and, and, compile, compile, compileRegex, compileRegex, evaluate, fromPredicate, or
public static final Glob DEFAULT_EXCLUDES
@Deprecated public void appendInclude(Glob include)
addInclude(include, false)
@Deprecated public void prependInclude(Glob include)
addInclude(include, true)
public void addInclude(Glob include, boolean override)
override
- If true
, then the glob takes precedence over all previously added includes and excludes;
if false
, then the glob is only applied if all previously added includes and exclude
do not matchmatches(String)
,
replace(String)
@Deprecated public void appendExclude(Glob exclude)
addExclude(exclude, false)
@Deprecated public void prependExclude(Glob exclude)
addExclude(exclude, true)
public void addExclude(Glob exclude, boolean override)
override
- If true
, then the glob takes precedence over all previously added includes and excludes;
if false
, then the glob is only applied if all previously added includes and exclude
do not matchmatches(String)
,
replace(String)
public boolean matches(String subject)
true
or false
is returned, depending on whether the match was an INCLUDE or an EXCLUDE.
If none of the includes and excludes match, true
or false
is returned, depending on whether the
lowest-priority rule is an EXCLUDE or an INCLUDE.@Nullable public String replace(String subject)
Copyright © 2018 Arno Unkrig. All rights reserved.