|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectde.unkrig.commons.text.pattern.Glob
de.unkrig.commons.text.pattern.IncludeExclude
public final class IncludeExclude
matches(java.lang.String)| Field Summary | |
|---|---|
static Glob |
DEFAULT_EXCLUDES
File names that one would typically exclude from file searches. |
| Fields inherited from class de.unkrig.commons.text.pattern.Glob |
|---|
ANY, INCLUDES_EXCLUDES, NONE, REPLACEMENT |
| Constructor Summary | |
|---|---|
IncludeExclude()
|
|
| Method Summary | |
|---|---|
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(java.lang.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) |
java.lang.String |
replace(java.lang.String subject)
The subject is transformed by all matching includes, until an exclude matches. |
java.lang.String |
toString()
|
| Methods inherited from class de.unkrig.commons.text.pattern.Glob |
|---|
and, and, and, compile, compile, compileRegex, compileRegex, evaluate, fromPredicate, or |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final Glob DEFAULT_EXCLUDES
| Constructor Detail |
|---|
public IncludeExclude()
| Method Detail |
|---|
@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(java.lang.String subject)
subject. On the first successful match,
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.
matches in class Globsubject matches this Glob.@Nullable public java.lang.String replace(java.lang.String subject)
subject is transformed by all matching includes, until an exclude matches.
replace in class Globnull iff an exclude matches before the first include matchespublic java.lang.String toString()
toString in class java.lang.Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||