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 IgnoreRulepublic void setIgnoreRuleId(String ignoreRuleId)
setIgnoreRuleId in interface IgnoreRulepublic String getNamePattern()
IgnoreRulenull.
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 IgnoreRulenull.IgnoreRule.getNameRegex()public void setNamePattern(String namePattern)
setNamePattern in interface IgnoreRulepublic String getNameRegex()
IgnoreRulenull.
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 IgnoreRulenull.IgnoreRule.getNamePattern()public void setNameRegex(String nameRegex)
setNameRegex in interface IgnoreRulepublic boolean isEnabled()
isEnabled in interface IgnoreRulepublic void setEnabled(boolean enabled)
setEnabled in interface IgnoreRulepublic boolean isCaseSensitive()
isCaseSensitive in interface IgnoreRulepublic void setCaseSensitive(boolean caseSensitive)
setCaseSensitive in interface IgnoreRulepublic Pattern getNameRegexPattern()
IgnoreRulePattern compiled from nameRegex
or namePattern. If nameRegex is specified, it overrules
namePattern, i.e. namePattern is used only, if nameRegex == null.getNameRegexPattern in interface IgnoreRulePattern compiled from nameRegex
or namePattern. null, if both nameRegex
and namePattern are null.Copyright © 2013–2019. All rights reserved.