public class NamedFilterConfig extends AbstractFilterConfig<NamedFilter,NamedFilterConfig>
FilterConfig
that has a name.Constructor and Description |
---|
NamedFilterConfig(NamedFilter owner)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
void |
accept(FilterConfigVisitor visitor)
Visits the appropriate
visit() function of a FilterConfigVisitor . |
FilterConfig<?,?> |
getConfig(java.lang.String name)
Returns the
FilterConfig for a sub-filter. |
java.util.Map<java.lang.String,FilterConfig<?,?>> |
getEntries()
Returns a
Map containing all configurations of sub-filters. |
protected NamedFilterConfig |
getThis()
Returns this filter config.
|
boolean |
isInverted()
Returns whether the filter should match if all sub-filters match or if at
least one sub-filter does not match.
|
boolean |
isSubFilterEnabled(java.lang.String name)
Returns whether a sub-filter is enabled.
|
void |
setInverted(boolean inverted)
Sets whether the filter should match if all sub-filters match or if at
least one sub-filter does not match.
|
void |
setSubFilterEnabled(java.lang.String name,
boolean enabled)
Sets whether a sub-filter is enabled.
|
addConfigChangeListener, fireEvent, getFilter, isEnabled, match, removeConfigChangeListener, reset, setEnabled
public NamedFilterConfig(@NotNull NamedFilter owner)
owner
- the filter this filter config belongs to@NotNull protected NamedFilterConfig getThis()
getThis
in class AbstractFilterConfig<NamedFilter,NamedFilterConfig>
public boolean isInverted()
true
) or if any does not match (false
)public void setInverted(boolean inverted)
inverted
- whether the filter matches if all sub-filters match
(true
) or if any does not match (false
)@NotNull public FilterConfig<?,?> getConfig(@NotNull java.lang.String name)
FilterConfig
for a sub-filter.name
- the sub-filter's namepublic boolean isSubFilterEnabled(@NotNull java.lang.String name)
name
- the sub-filter's namepublic void setSubFilterEnabled(@NotNull java.lang.String name, boolean enabled)
name
- the sub-filter's nameenabled
- whether the sub-filter is enabledpublic void accept(@NotNull FilterConfigVisitor visitor)
visit()
function of a FilterConfigVisitor
.visitor
- the visitor to call@NotNull public java.util.Map<java.lang.String,FilterConfig<?,?>> getEntries()
Map
containing all configurations of sub-filters.