Class CombinedTableFilter<T>

java.lang.Object
docking.widgets.table.CombinedTableFilter<T>
Type Parameters:
T - the type of table row objects.
All Implemented Interfaces:
TableFilter<T>

public class CombinedTableFilter<T> extends Object implements TableFilter<T>
Combines multiple Table Filters into a single TableFilter that can be applied. All contained filters must pass for this combined filter to pass.
  • Constructor Details

  • Method Details

    • acceptsRow

      public boolean acceptsRow(T rowObject)
      Description copied from interface: TableFilter
      Returns true if this filter matches the given row (data)
      Specified by:
      acceptsRow in interface TableFilter<T>
      Parameters:
      rowObject - the current row object
      Returns:
      true if the element at the given row matches this filter.
    • isEmpty

      public boolean isEmpty()
      Description copied from interface: TableFilter
      A method that allows filters to report that they have nothing to actually filter. This is useful for empty/null filters.
      Specified by:
      isEmpty in interface TableFilter<T>
      Returns:
      true if this filter will not perform any filtering
    • getFilterCount

      public int getFilterCount()
      Returns the number of sub-filters in this combined filter.
      Returns:
      the number of sub-filters in this combined filter.
    • getFilter

      public TableFilter<?> getFilter(int index)
      Returns the filter at the given index into the list of sub filters.
      Parameters:
      index - the index of the filter to retrieve
      Returns:
      the i'th filter.
    • isSubFilterOf

      public boolean isSubFilterOf(TableFilter<?> tableFilter)
      Description copied from interface: TableFilter
      Returns true if this filter is a more specific version of the given filter.

      For example, if this filter is a 'starts with' text filter, with the value of 'bobo', then if the given filter is also a 'starts with' filter, with a value of 'bob', then this filter is considered a sub-filter of the given sub-filter.

      Specified by:
      isSubFilterOf in interface TableFilter<T>
      Parameters:
      tableFilter - the filter to check
      Returns:
      true if this filter is a sub-filter of the given filter
    • hasColumnFilter

      public boolean hasColumnFilter(int modelIndex)
      Description copied from interface: TableFilter
      Returns true if the there is a column filter on the column specified
      Specified by:
      hasColumnFilter in interface TableFilter<T>
      Parameters:
      modelIndex - the model index of the column to test for column filters.
      Returns:
      true if the there is a column filter on the column specified.
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object