Class FilterSet

java.lang.Object
com.puppycrawl.tools.checkstyle.api.FilterSet
All Implemented Interfaces:
Filter

public class FilterSet extends Object implements Filter
A filter set applies filters to AuditEvents. If a filter in the set rejects an AuditEvent, then the AuditEvent is rejected. Otherwise, the AuditEvent is accepted.
  • Field Details

  • Constructor Details

  • Method Details

    • addFilter

      public void addFilter(Filter filter)
      Adds a Filter to the set.
      Parameters:
      filter - the Filter to add.
    • removeFilter

      public void removeFilter(Filter filter)
      Removes filter.
      Parameters:
      filter - filter to remove.
    • getFilters

      public Set<Filter> getFilters()
      Returns the Filters of the filter set.
      Returns:
      the Filters of the filter set.
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • accept

      public boolean accept(AuditEvent event)
      Description copied from interface: Filter
      Determines whether or not a filtered AuditEvent is accepted.
      Specified by:
      accept in interface Filter
      Parameters:
      event - the AuditEvent to filter.
      Returns:
      true if the event is accepted.
    • clear

      public void clear()
      Clears the FilterSet.