|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectdanger.content.ContentFilter
danger.content.AggregateFilter
public class AggregateFilter
A filter used to combine filters into more complex filters.
Here's an example of an aggregate filter that includes all audio types that are not an m3u playlist, and that are not under a particular directory:
AggregateFilter filter = new AggregateFilter();
MimeTypeFilter mimeTypeFilter = new MimeTypeFilter(false);
mimeTypeFilter.includeGroup("audio");
mimeTypeFilter.excludeType("audio/x-mpegurl");
PathFilter pathFilter = new PathFilter(true);
pathFilter.excludePath("/removable0/themes");
filter.addFilter(mimeTypeFilter);
filter.addFilter(pathFilter);
| Constructor Summary | |
|---|---|
AggregateFilter()
Create an new, empty aggregate filter. |
|
| Method Summary | |
|---|---|
boolean |
accept(ContentFile file)
The filtering logic. |
void |
addFilter(ContentFilter filter)
Add a filter to this aggregate, to be processed in the order they are added. |
void |
dump()
Used for debugging purposes. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AggregateFilter()
| Method Detail |
|---|
public void addFilter(ContentFilter filter)
public boolean accept(ContentFile file)
throws StoreException
ContentFilter
accept in class ContentFilterStoreExceptionpublic void dump()
ContentFilter
dump in class ContentFilter
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||