|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.jidesoft.filter.AbstractFilter<T> com.jidesoft.filter.InFilter<T>
public class InFilter<T>
A Filter
returns false in isValueFiltered(Object)
only if the input value is in a collection of
the specified values.
new InFilter(new
Object[]{20.0}).isValueFilter(20)
returns false.
Field Summary |
---|
Fields inherited from interface com.jidesoft.filter.Filter |
---|
ALL, CUSTOM, NULL, SEPARATOR |
Constructor Summary | |
---|---|
InFilter()
Creates an InFilter. |
|
InFilter(String name,
T[] values)
Creates MultipleValuesFilter. |
|
InFilter(T[] values)
Creates an InFilter. |
Method Summary | |
---|---|
boolean |
equals(Object obj)
|
String |
getName()
Gets the name of the filter. |
String |
getOperator()
Gets the operator. |
String |
getPreference(Class<?> clazz,
ConverterContext converterContext)
Gets the preference while persisting this filter. |
T[] |
getValues()
Gets the only allowed value. |
boolean |
isFilterValid()
Checks if the filter is valid or not. |
boolean |
isValueFiltered(T value)
Checks to see if the value should be filtered. |
Object[] |
setPreference(String prefString,
Class<?> clazz,
ConverterContext converterContext)
Sets the preference to load the preference string back to this filter. |
void |
setValues(T[] values)
Sets the allowed values. |
boolean |
stricterThan(Filter inputFilter)
Check if this filter is stricter than the input filter while the two filters are with the same class. |
Methods inherited from class com.jidesoft.filter.AbstractFilter |
---|
addFilterListener, clone, fireFilterChanged, fireFilterContentChanged, fireFilterDisabled, fireFilterEnabled, fireFilterNameChanged, getConditionString, getFilterFactory, getFilterFactoryName, getFilterListeners, getObjectGrouper, getObjectGrouperName, isEnabled, removeFilterListener, setEnabled, setFilterFactory, setFilterFactoryName, setName, setObjectGrouper, setObjectGrouperName |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public InFilter()
public InFilter(T[] values)
values
- the values that will not be filteredpublic InFilter(String name, T[] values)
name
- name of the filtervalues
- the values that will not be filteredMethod Detail |
---|
public boolean isValueFiltered(T value)
Filter
isValueFiltered
in interface Filter<T>
value
- the value to filter
public void setValues(T[] values)
values
- the allowed values.public T[] getValues()
public String getOperator()
getOperator
in interface SqlFilterSupport
public String getName()
Filter
getName
in interface Filter<T>
getName
in class AbstractFilter<T>
public boolean stricterThan(Filter inputFilter)
stricterThan
in interface Filter<T>
stricterThan
in class AbstractFilter<T>
inputFilter
- the input filter
public boolean equals(Object obj)
equals
in class Object
public String getPreference(Class<?> clazz, ConverterContext converterContext)
Filter
getPreference
in interface Filter<T>
getPreference
in class AbstractFilter<T>
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
public Object[] setPreference(String prefString, Class<?> clazz, ConverterContext converterContext)
Filter
setPreference
in interface Filter<T>
setPreference
in class AbstractFilter<T>
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
public boolean isFilterValid()
AbstractFilter
AbstractFilter.setPreference(String, Class, com.jidesoft.converter.ConverterContext)
is valid or not.
isFilterValid
in class AbstractFilter<T>
|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |