JIDE 3.5.15

com.jidesoft.filter
Interface ValueFilter<E>

Type Parameters:
E - the type of elements that can be filtered
All Superinterfaces:
Cloneable, Filter<E>, Iterable<E>, Serializable
All Known Subinterfaces:
MutableValueFilter<E>
All Known Implementing Classes:
AbstractMutableValueFilter, AbstractValueFilter, SimpleValueFilter

public interface ValueFilter<E>
extends Iterable<E>, Filter<E>

This interface represents the current state of a filter. A filter is to be understood in the broad sense and not only related to user interactions.


Field Summary
 
Fields inherited from interface com.jidesoft.filter.Filter
ALL, CUSTOM, NULL, SEPARATOR
 
Method Summary
 void addValueFilterListener(ValueFilterListener<E> listener)
          Add a listener to the list that's notified each time a change to the filter occurs.
 void addWeakFilterListener(ValueFilterListener<E> listener)
          Add a listener to the list that's notified each time a change to the filter occurs.
 int getFilteredCount()
          Returns the number of elements currently filtered.
 boolean isActive()
          Indicates whether at least one element is currently filtered.
 boolean isOnlyValueFiltered(E element, Object lock)
          Indicates whether a given element is filtered or not exclusively by the given lock.
 boolean isValueFiltered(E element)
          Indicates whether a given element is filtered or not.
 boolean isValueFiltered(E element, Object lock)
          Indicates whether a given element is filtered or not by the given lock.
 void removeFilterListener(ValueFilterListener<E> listener)
          Remove a listener to the list that's notified each time a change to the filter occurs.
 void removeFilterListeners()
          Remove all listeners to the list that's notified each time a change to the selection occurs.
 
Methods inherited from interface java.lang.Iterable
iterator
 
Methods inherited from interface com.jidesoft.filter.Filter
addFilterListener, clone, getFilterFactory, getFilterFactoryName, getName, getPreference, isEnabled, removeFilterListener, setEnabled, setFilterFactory, setFilterFactoryName, setName, setPreference, stricterThan
 

Method Detail

isActive

boolean isActive()
Indicates whether at least one element is currently filtered.

Returns:
true if at least one element is filtered, false otherwise.

isValueFiltered

boolean isValueFiltered(E element)
Indicates whether a given element is filtered or not.

Specified by:
isValueFiltered in interface Filter<E>
Parameters:
element - the element to be tested
Returns:
true if the element is filtered, false otherwise

isValueFiltered

boolean isValueFiltered(E element,
                        Object lock)
Indicates whether a given element is filtered or not by the given lock.

Parameters:
element - the element to be tested
lock - the object used to filter the element
Returns:
true if the element is filtered, false otherwise

isOnlyValueFiltered

boolean isOnlyValueFiltered(E element,
                            Object lock)
Indicates whether a given element is filtered or not exclusively by the given lock.

Parameters:
element - the element to be tested
lock - the object used to filter the element
Returns:
true if the element is filtered, false otherwise

getFilteredCount

int getFilteredCount()
Returns the number of elements currently filtered.

Returns:
the number of filtered elements.

addValueFilterListener

void addValueFilterListener(ValueFilterListener<E> listener)
Add a listener to the list that's notified each time a change to the filter occurs.

Parameters:
listener - the SelectionListener

addWeakFilterListener

void addWeakFilterListener(ValueFilterListener<E> listener)
Add a listener to the list that's notified each time a change to the filter occurs. The listener will automatically be disposed of should no other object have a reference to it.

Parameters:
listener - the SelectionListener

removeFilterListener

void removeFilterListener(ValueFilterListener<E> listener)
Remove a listener to the list that's notified each time a change to the filter occurs.

Parameters:
listener - the SelectionListener

removeFilterListeners

void removeFilterListeners()
Remove all listeners to the list that's notified each time a change to the selection occurs.


JIDE 3.5.15