Package docking.widgets.table
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>
Combines multiple Table Filters into a single TableFilter that can be applied. All contained
filters must pass for this combined filter to pass.
-
Constructor Summary
ConstructorsConstructorDescriptionCombinedTableFilter(TableFilter<T> filter1, TableFilter<T> filter2, TableFilter<T> filter3) -
Method Summary
Modifier and TypeMethodDescriptionbooleanacceptsRow(T rowObject) Returns true if this filter matches the given row (data)booleanTableFilter<?> getFilter(int index) Returns the filter at the given index into the list of sub filters.intReturns the number of sub-filters in this combined filter.booleanhasColumnFilter(int modelIndex) Returns true if the there is a column filter on the column specifiedinthashCode()booleanisEmpty()A method that allows filters to report that they have nothing to actually filter.booleanisSubFilterOf(TableFilter<?> tableFilter) Returns true if this filter is a more specific version of the given filter.
-
Constructor Details
-
CombinedTableFilter
-
-
Method Details
-
acceptsRow
Description copied from interface:TableFilterReturns true if this filter matches the given row (data)- Specified by:
acceptsRowin interfaceTableFilter<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:TableFilterA method that allows filters to report that they have nothing to actually filter. This is useful for empty/null filters.- Specified by:
isEmptyin interfaceTableFilter<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
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
Description copied from interface:TableFilterReturns 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:
isSubFilterOfin interfaceTableFilter<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:TableFilterReturns true if the there is a column filter on the column specified- Specified by:
hasColumnFilterin interfaceTableFilter<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() -
equals
-