public class IgnoreRuleImpl extends Object implements IgnoreRule
Constructor and Description |
---|
IgnoreRuleImpl() |
Modifier and Type | Method and Description |
---|---|
String |
getIgnoreRuleId() |
String |
getNamePattern()
Gets a shell-style name-pattern or
null . |
String |
getNameRegex()
Gets a regular expression or
null . |
Pattern |
getNameRegexPattern()
|
boolean |
isCaseSensitive() |
boolean |
isEnabled() |
void |
setCaseSensitive(boolean caseSensitive) |
void |
setEnabled(boolean enabled) |
void |
setIgnoreRuleId(String ignoreRuleId) |
void |
setNamePattern(String namePattern) |
void |
setNameRegex(String nameRegex) |
String |
toString() |
public IgnoreRuleImpl()
public String getIgnoreRuleId()
getIgnoreRuleId
in interface IgnoreRule
public void setIgnoreRuleId(String ignoreRuleId)
setIgnoreRuleId
in interface IgnoreRule
public String getNamePattern()
IgnoreRule
null
.
An ignore-rule may be specified using shell-patterns like "*.jpg" or "*.b?k". They are implicitly converted to regular expressions.
This name-pattern is checked against the file's name without path as returned by
File.getName()
(e.g. "image_938732.jpg").
If both, a regular expression and a shell-pattern are specified, the regular expression is used and this pattern ignored.
getNamePattern
in interface IgnoreRule
null
.IgnoreRule.getNameRegex()
public void setNamePattern(String namePattern)
setNamePattern
in interface IgnoreRule
public String getNameRegex()
IgnoreRule
null
.
This regular expression must match the entire file name (without path) - not only be contained in it. For example the regular expression "tree\.jpg" matches only the file "tree.jpg" and not the file "large_tree.jpg".
This name-regex is checked against the file's name without path as returned by
File.getName()
(e.g. "image_938732.jpg").
getNameRegex
in interface IgnoreRule
null
.IgnoreRule.getNamePattern()
public void setNameRegex(String nameRegex)
setNameRegex
in interface IgnoreRule
public boolean isEnabled()
isEnabled
in interface IgnoreRule
public void setEnabled(boolean enabled)
setEnabled
in interface IgnoreRule
public boolean isCaseSensitive()
isCaseSensitive
in interface IgnoreRule
public void setCaseSensitive(boolean caseSensitive)
setCaseSensitive
in interface IgnoreRule
public Pattern getNameRegexPattern()
IgnoreRule
Pattern
compiled from nameRegex
or namePattern
. If nameRegex
is specified, it overrules
namePattern
, i.e. namePattern
is used only, if nameRegex == null
.getNameRegexPattern
in interface IgnoreRule
Pattern
compiled from nameRegex
or namePattern
. null
, if both nameRegex
and namePattern
are null
.Copyright © 2013–2019. All rights reserved.