JIDE 3.3.1

com.jidesoft.grid
Class MultipleValuesFilter<T>

java.lang.Object
  extended by com.jidesoft.filter.AbstractFilter<T>
      extended by com.jidesoft.grid.AbstractFilter<T>
          extended by com.jidesoft.grid.AbstractTableFilter<T>
              extended by com.jidesoft.grid.MultipleValuesFilter<T>
All Implemented Interfaces:
Filter<T>, SqlFilterSupport, TableFilter<T>, Serializable, Cloneable

public class MultipleValuesFilter<T>
extends AbstractTableFilter<T>
implements SqlFilterSupport

A Filter that uses filters away all values that are not in the object array.

See Also:
Serialized Form

Field Summary
 
Fields inherited from interface com.jidesoft.filter.Filter
ALL, CUSTOM, NULL
 
Constructor Summary
MultipleValuesFilter(String name, T[] values)
          Creates MultipleValuesFilter.
MultipleValuesFilter(T[] values)
          Creates MultipleValuesFilter.
 
Method Summary
 String getName()
          Gets the name of the filter.
 ObjectGrouper getObjectGrouper()
           
 String getOperator()
          Gets the operator.
 T[] getValues()
          Sets the only allowed value.
 boolean isValueFiltered(T value)
          Checks to see if the value should be filtered.
 void setObjectGrouper(ObjectGrouper objectGrouper)
           
 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.grid.AbstractTableFilter
getColumnIndex, getRowIndex, setColumnIndex, setRowIndex
 
Methods inherited from class com.jidesoft.filter.AbstractFilter
addFilterListener, clone, fireFilterChanged, fireFilterContentChanged, fireFilterDisabled, fireFilterEnabled, fireFilterNameChanged, getConditionString, getFilterFactory, getFilterFactoryName, getFilterListeners, isEnabled, removeFilterListener, setEnabled, setFilterFactory, setFilterFactoryName, setName
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.jidesoft.filter.Filter
addFilterListener, clone, getFilterFactory, getFilterFactoryName, isEnabled, removeFilterListener, setEnabled, setFilterFactory, setFilterFactoryName, setName
 

Constructor Detail

MultipleValuesFilter

public MultipleValuesFilter(T[] values)
Creates MultipleValuesFilter.

Parameters:
values - the values that will not be filtered

MultipleValuesFilter

public MultipleValuesFilter(String name,
                            T[] values)
Creates MultipleValuesFilter.

Parameters:
name - name of the filter
values - the values that will not be filtered
Method Detail

isValueFiltered

public boolean isValueFiltered(T value)
Description copied from interface: Filter
Checks to see if the value should be filtered.

Specified by:
isValueFiltered in interface Filter<T>
Parameters:
value - the value to filter
Returns:
true if the value should be filtered. Otherwise false.

getObjectGrouper

public ObjectGrouper getObjectGrouper()

setObjectGrouper

public void setObjectGrouper(ObjectGrouper objectGrouper)

getValues

public T[] getValues()
Sets the only allowed value.

Returns:
the only allowed value.

setValues

public void setValues(T[] values)
Sets the allowed values.

Parameters:
values - the allowed values.

getName

public String getName()
Description copied from interface: Filter
Gets the name of the filter.

Specified by:
getName in interface Filter<T>
Overrides:
getName in class AbstractFilter<T>
Returns:
the name of the filter.

stricterThan

public boolean stricterThan(Filter inputFilter)
Check if this filter is stricter than the input filter while the two filters are with the same class.

Specified by:
stricterThan in interface Filter<T>
Overrides:
stricterThan in class AbstractFilter<T>
Parameters:
inputFilter - the input filter
Returns:
TRUE if all value in this filter are also in the input filter. Otherwise false.

getOperator

public String getOperator()
Gets the operator. It will return " IN " by default.

Specified by:
getOperator in interface SqlFilterSupport
Returns:
the operator.

JIDE 3.3.1