Class AbstractFilterConfig<F extends Filter<F,​C>,​C extends FilterConfig<F,​C>>

    • Constructor Detail

      • AbstractFilterConfig

        protected AbstractFilterConfig​(@NotNull
                                       F filter)
        Creates a new instance.
        Parameters:
        filter - the filter this filter config belongs to
    • Method Detail

      • setEnabled

        public void setEnabled​(boolean enabled)
        Description copied from interface: FilterConfig
        Enables or disables the filter.
        Specified by:
        setEnabled in interface FilterConfig<F extends Filter<F,​C>,​C extends FilterConfig<F,​C>>
        Parameters:
        enabled - whether the filter should be enabled
      • fireEvent

        protected void fireEvent​(@NotNull
                                 @NotNull FilterConfigChangeType filterConfigChangeType,
                                 @NotNull
                                 @NotNull FilterConfig<?,​?> filterConfig)
        Notify all listeners that a FilterConfig has happened.
        Parameters:
        filterConfigChangeType - the config event type
        filterConfig - the changed filter config
      • match

        public boolean match​(@NotNull
                             @NotNull GameObject<?,​?,​?> gameObject)
        Description copied from interface: FilterConfig
        Tells whether we got a match on specific 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.
        Specified by:
        match in interface FilterConfig<F extends Filter<F,​C>,​C extends FilterConfig<F,​C>>
        Parameters:
        gameObject - the game object being analyzed on the map
        Returns:
        whether it matches the criteria
      • reset

        public boolean reset()
        Description copied from interface: FilterConfig
        Tells the filter we have finished with current map square and, perhaps, we are jumping on next one.
        Specified by:
        reset in interface FilterConfig<F extends Filter<F,​C>,​C extends FilterConfig<F,​C>>
        Returns:
        whether we had a global match on the map square
      • getThis

        @NotNull
        protected abstract C getThis()
        Returns this filter config.
        Returns:
        this filter config