|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.dv.sbu.filefilter.buildin.FilterChain
public class FilterChain
Builds a chain of other filters. Possible modes are AND or OR (default).
Filters can be added to the list.
Empty lists on acceptFile(SourceFileInformation)
calls will return false
.
Nested Class Summary | |
---|---|
static class |
FilterChain.Mode
Modes for the chain: conjunction or disjunction. |
Field Summary | |
---|---|
java.util.List<IFileFilter> |
filters
The chained filters. |
FilterChain.Mode |
mode
The chaining mode: OR or AND. |
Constructor Summary | |
---|---|
FilterChain()
|
Method Summary | |
---|---|
boolean |
acceptFile(SourceFileInformation fileInfo)
Test the given file information object relative to some root directory. |
java.util.List<IFileFilter> |
getFilters()
Returns the chained filters. |
FilterChain.Mode |
getMode()
Returns the logical mode. |
void |
setFilters(java.util.List<IFileFilter> filters)
Sets the wrapped filters. |
void |
setMode(FilterChain.Mode mode)
Sets the logical mode. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public java.util.List<IFileFilter> filters
public FilterChain.Mode mode
FilterChain.Mode.OR
.
Constructor Detail |
---|
public FilterChain()
Method Detail |
---|
public boolean acceptFile(SourceFileInformation fileInfo)
acceptFile
in interface IFileFilter
fileInfo
- The file information to test.
true
if the file is accepted. false
if the file is rejected.IFileFilter.acceptFile(de.dv.sbu.SourceFileInformation)
public FilterChain.Mode getMode()
public void setMode(FilterChain.Mode mode) throws java.lang.NullPointerException
mode
- The mode to set.
java.lang.NullPointerException
- The argument is null
.public java.util.List<IFileFilter> getFilters()
public void setFilters(java.util.List<IFileFilter> filters) throws java.lang.NullPointerException
filters
- The filters to set.
java.lang.NullPointerException
- The list is or contains null
.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |