public class NamedFilterSet extends Object implements Predicate<Keyed>
NamedFilter
s to be applied to an
Exporter
.
For easy of usage, it provides an Predicate
interface, which operates as a logical
OR
of all filters in this set.
It also provides set-like operation to merge NamedFilterSets and extract a subset of it.
For the scope if this class, a NamedFilter
is identified only by its name.Constructor and Description |
---|
NamedFilterSet(NamedFilter filter) |
NamedFilterSet(Set<NamedFilter> filters) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
int |
hashCode() |
boolean |
isEmpty() |
NamedFilterSet |
subset(Set<String> filterNames)
Returns a new NamedFilterSet containing only the NamedFilters with the given names.
|
boolean |
test(Keyed key) |
NamedFilterSet |
union(NamedFilterSet other)
Creates a new
NamedFilterSet containing all the NamedFilter s from
this object, plus any NamedFilter s from the other set that is not
contained the current NamedFilterSet . |
public NamedFilterSet(NamedFilter filter)
public NamedFilterSet(Set<NamedFilter> filters)
public boolean isEmpty()
public NamedFilterSet subset(Set<String> filterNames)
NoSuchElementException
if the filterNames
contains any name
that isn't defined in this NamedFilterSetpublic NamedFilterSet union(NamedFilterSet other)
NamedFilterSet
containing all the NamedFilter
s from
this object, plus any NamedFilter
s from the other
set that is not
contained the current NamedFilterSet
.