public interface FilterConfig<F extends Filter<F,C>,C extends FilterConfig<F,C>>
Modifier and Type | Method and Description |
---|---|
void |
accept(@NotNull FilterConfigVisitor visitor)
Visits the appropriate
visit() function of a FilterConfigVisitor . |
void |
addConfigChangeListener(FilterConfigListener listener)
Adds a
FilterConfigListener to be notified about changes. |
F |
getFilter()
Returns the
Filter this filter config belongs to. |
boolean |
isEnabled()
Returns whether the filter is enabled.
|
boolean |
match(@NotNull GameObject<?,?,?> gameObject)
Tells whether we got a match on specific
GameObject . |
void |
removeConfigChangeListener(FilterConfigListener listener)
Removes a
FilterConfigListener to be notified about changes. |
boolean |
reset()
Tells the filter we have finished with current map square and, perhaps,
we are jumping on next one.
|
void |
setEnabled(boolean enabled)
Enables or disables the filter.
|
@NotNull F getFilter()
Filter
this filter config belongs to.void setEnabled(boolean enabled)
enabled
- whether the filter should be enabledboolean isEnabled()
void addConfigChangeListener(FilterConfigListener listener)
FilterConfigListener
to be notified about changes.listener
- the listenervoid removeConfigChangeListener(FilterConfigListener listener)
FilterConfigListener
to be notified about changes.listener
- the listenervoid accept(@NotNull @NotNull FilterConfigVisitor visitor)
visit()
function of a FilterConfigVisitor
.visitor
- the visitor to callboolean match(@NotNull @NotNull GameObject<?,?,?> gameObject)
GameObject
. The analysis
tool will call this function with every game object on a given map
square. The match function is responsible for analyzing inventories if it
needs to.gameObject
- the game object being analyzed on the mapboolean reset()