Package net.sf.gridarta.model.filter
Class NamedFilterConfig
- java.lang.Object
-
- net.sf.gridarta.model.filter.AbstractFilterConfig<NamedFilter,NamedFilterConfig>
-
- net.sf.gridarta.model.filter.NamedFilterConfig
-
- All Implemented Interfaces:
FilterConfig<NamedFilter,NamedFilterConfig>
public class NamedFilterConfig extends AbstractFilterConfig<NamedFilter,NamedFilterConfig>
AFilterConfigthat has a name.
-
-
Constructor Summary
Constructors Constructor Description NamedFilterConfig(@NotNull NamedFilter owner)Creates a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaccept(@NotNull FilterConfigVisitor visitor)Visits the appropriatevisit()function of aFilterConfigVisitor.@NotNull FilterConfig<?,?>getConfig(@NotNull java.lang.String name)Returns theFilterConfigfor a sub-filter.@NotNull java.util.Map<java.lang.String,FilterConfig<?,?>>getEntries()Returns aMapcontaining all configurations of sub-filters.protected @NotNull NamedFilterConfiggetThis()Returns this filter config.booleanisInverted()Returns whether the filter should match if all sub-filters match or if at least one sub-filter does not match.booleanisSubFilterEnabled(@NotNull java.lang.String name)Returns whether a sub-filter is enabled.voidsetInverted(boolean inverted)Sets whether the filter should match if all sub-filters match or if at least one sub-filter does not match.voidsetSubFilterEnabled(@NotNull java.lang.String name, boolean enabled)Sets whether a sub-filter is enabled.-
Methods inherited from class net.sf.gridarta.model.filter.AbstractFilterConfig
addConfigChangeListener, fireEvent, getFilter, isEnabled, match, removeConfigChangeListener, reset, setEnabled
-
-
-
-
Constructor Detail
-
NamedFilterConfig
public NamedFilterConfig(@NotNull @NotNull NamedFilter owner)Creates a new instance.- Parameters:
owner- the filter this filter config belongs to
-
-
Method Detail
-
getThis
@NotNull protected @NotNull NamedFilterConfig getThis()
Description copied from class:AbstractFilterConfigReturns this filter config.- Specified by:
getThisin classAbstractFilterConfig<NamedFilter,NamedFilterConfig>- Returns:
- this filter config
-
isInverted
public boolean isInverted()
Returns whether the filter should match if all sub-filters match or if at least one sub-filter does not match.- Returns:
- whether the filter matches if all sub-filters match (
true) or if any does not match (false)
-
setInverted
public 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.- Parameters:
inverted- whether the filter matches if all sub-filters match (true) or if any does not match (false)
-
getConfig
@NotNull public @NotNull FilterConfig<?,?> getConfig(@NotNull @NotNull java.lang.String name)
Returns theFilterConfigfor a sub-filter.- Parameters:
name- the sub-filter's name- Returns:
- the sub-filter's filter config
-
isSubFilterEnabled
public boolean isSubFilterEnabled(@NotNull @NotNull java.lang.String name)Returns whether a sub-filter is enabled.- Parameters:
name- the sub-filter's name- Returns:
- whether the sub-filter is enabled
-
setSubFilterEnabled
public void setSubFilterEnabled(@NotNull @NotNull java.lang.String name, boolean enabled)Sets whether a sub-filter is enabled.- Parameters:
name- the sub-filter's nameenabled- whether the sub-filter is enabled
-
accept
public void accept(@NotNull @NotNull FilterConfigVisitor visitor)Description copied from interface:FilterConfigVisits the appropriatevisit()function of aFilterConfigVisitor.- Parameters:
visitor- the visitor to call
-
getEntries
@NotNull public @NotNull java.util.Map<java.lang.String,FilterConfig<?,?>> getEntries()
Returns aMapcontaining all configurations of sub-filters.- Returns:
- the map
-
-