|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Filter<T>
Filter is used to filter some values away by checking the value in isValueFiltered(Object)
. If isValueFiltered(Object)
returns true, the value should be filtered. Otherwise, it should return false.
getName()
. You can also enable or disable a
filter. If a filter is disabled, no matter what value isValueFiltered returns, it should never be considered.
AbstractFilter
implements this interface to provide basic support a Filter needs such as name,
enabled/disabled, and listener support.
Field Summary | |
---|---|
static String |
ALL
A constant for ALL for filters. |
static String |
CUSTOM
A constant for ALL for filters. |
static String |
NULL
A constant for null value for filters. |
static String |
SEPARATOR
|
Method Summary | |
---|---|
void |
addFilterListener(FilterListener l)
Adds a listener to the list that's notified each time a change to the filter occurs. |
Object |
clone()
Creates and returns a copy of the filter. |
FilterFactory |
getFilterFactory()
Gets the FilterFactory. |
String |
getFilterFactoryName()
Gets the FilterFactory name. |
String |
getName()
Gets the name of the filter. |
String |
getPreference(Class<?> clazz,
ConverterContext converterContext)
Gets the preference while persisting this filter. |
boolean |
isEnabled()
Checks if the filter is enabled. |
boolean |
isValueFiltered(T value)
Checks to see if the value should be filtered. |
void |
removeFilterListener(FilterListener l)
Removes a listener from the list that's notified each time a change to the filter occurs. |
void |
setEnabled(boolean enabled)
Sets the filter enabled or disabled. |
void |
setFilterFactory(FilterFactory filterFactory)
Sets the FilterFactory that creates this Filter. |
void |
setFilterFactoryName(String name)
Sets the FilterFactory name that creates this Filter. |
void |
setName(String name)
Sets the name of the filter. |
Object[] |
setPreference(String prefString,
Class<?> clazz,
ConverterContext converterContext)
Sets the preference to load the preference string back to this filter. |
boolean |
stricterThan(Filter inputFilter)
Checks if this filter is stricter than the input filter. |
Field Detail |
---|
static final String ALL
static final String NULL
static final String CUSTOM
static final String SEPARATOR
Method Detail |
---|
String getName()
void setName(String name)
name
- the name of the filter.boolean isValueFiltered(T value)
value
- the value to filter
boolean isEnabled()
void setEnabled(boolean enabled)
enabled
- true to enabled the filter; false to disable it.FilterFactory getFilterFactory()
void setFilterFactory(FilterFactory filterFactory)
filterFactory
- the FilterFactory that creates this Filter.String getFilterFactoryName()
void setFilterFactoryName(String name)
name
- the FilterFactory that creates this Filter.void addFilterListener(FilterListener l)
l
- the FilterListenervoid removeFilterListener(FilterListener l)
l
- the FilterListenerboolean stricterThan(Filter inputFilter)
inputFilter
- the input filter
String getPreference(Class<?> clazz, ConverterContext converterContext)
clazz
- the class type to convert the values inside the filter to stringconverterContext
- the converter context to convert the values inside the filter to string
Object[] setPreference(String prefString, Class<?> clazz, ConverterContext converterContext)
prefString
- the preference stringclazz
- the class type to convert the values inside the filter to stringconverterContext
- the converter context to convert the values inside the filter to string
Object clone() throws CloneNotSupportedException
CloneNotSupportedException
- if the cloning of the filter is not supported.
|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |