java.lang.Object
io.github.palexdev.materialfx.beans.FilterBean<T,U>
- Type Parameters:
T- the type of objects to filterU- the type of objects on which theBiPredicateoperates
A simple bean that has all the necessary information to produce a
Predicate
for a given T object type.
It wraps the following data:
- A String which is the query
- An object of type AbstractFilter, which is effectively responsible for producing the Predicate
- A BiPredicateBean, which is used by AbstractFilter, see AbstractFilter.predicateFor(String) or AbstractFilter.predicateFor(String, BiPredicate)
- A ChainMode enumeration to specify how this filter should be combined with other filters
-
Constructor Summary
ConstructorsConstructorDescriptionFilterBean(String query, AbstractFilter<T, U> filter, BiPredicateBean<U, U> predicateBean) FilterBean(String query, AbstractFilter<T, U> filter, BiPredicateBean<U, U> predicateBean, ChainMode mode) -
Method Summary
Modifier and TypeMethodDescriptionDelegate forAbstractFilter.name().getMode()Delegate forBiPredicateBean.name().getQuery()CallsAbstractFilter.predicateFor(String)with the query specified by this bean.voidSets the chain mode to the specified one.
-
Constructor Details
-
FilterBean
-
FilterBean
public FilterBean(String query, AbstractFilter<T, U> filter, BiPredicateBean<U, U> predicateBean, ChainMode mode)
-
-
Method Details
-
predicate
CallsAbstractFilter.predicateFor(String)with the query specified by this bean. -
getQuery
- Returns:
- the query, see
AbstractFilterdocumentation for more info about the query
-
getFilter
- Returns:
- the
AbstractFilterspecified by this bean
-
getFilterName
Delegate forAbstractFilter.name(). -
getPredicateBean
- Returns:
- the
BiPredicateBeanspecified by this bean
-
getPredicateName
Delegate forBiPredicateBean.name(). -
getMode
- Returns:
- the
ChainModeenumeration that specifies how this filter should be chained with other filters.
-
setMode
Sets the chain mode to the specified one.
-