T
- the type of element to check.public class CompositeFilter<T> extends java.lang.Object implements Filter<T>
A composite filter accepts an element if all its children filters accept the element.
Constructor and Description |
---|
CompositeFilter()
Creates a composite filter.
|
Modifier and Type | Method and Description |
---|---|
boolean |
accept(T element)
Checks whether or not the specified element is accepted.
|
void |
addFilter(Filter<T> filter)
Adds a filter in this composite.
|
void |
removeFilter(Filter<T> filter)
Removes a font filter in this composite.
|
public void addFilter(Filter<T> filter)
filter
- the filter to add.java.lang.NullPointerException
- if the given filter is null
.public void removeFilter(Filter<T> filter)
filter
- the filter to remove.