Package com.macrofocus.filter
Class SimpleFilter<E>
java.lang.Object
com.macrofocus.filter.AbstractFilter<E>
com.macrofocus.filter.AbstractMutableFilter<E>
com.macrofocus.filter.SimpleFilter<E>
- All Implemented Interfaces:
Filter<E>,MutableFilter<E>
A simple mutable filter implementation.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidclearFilterBy(Object locksmith) intReturns the number of elements currently filtered.booleanisActive()Indicates whether at least one element is currently filtered.booleanisFiltered(E element) Indicates whether a given element is filtered or not.booleanisFilteredBy(E element, Object locksmith) Indicates whether a given element is filtered or not by the given locksmith.iterator()voidsetFiltered(E element, boolean filtered, Object locksmith) voidsetFilteredIterable(Iterable<E> elements, boolean filtered, Object locksmith) voidMethods inherited from class com.macrofocus.filter.AbstractMutableFilter
setEnabledMethods inherited from class com.macrofocus.filter.AbstractFilter
addFilterListener, addWeakFilterListener, isEnabled, notifyFilteredChanged, removeFilterListener, removeFilterListenersMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.macrofocus.filter.Filter
addFilterListener, addWeakFilterListener, isEnabled, removeFilterListener, removeFilterListeners
-
Constructor Details
-
SimpleFilter
public SimpleFilter()
-
-
Method Details
-
isActive
public boolean isActive()Description copied from interface:FilterIndicates whether at least one element is currently filtered.- Returns:
- true if at least one element is filtered, false otherwise.
-
isFiltered
Description copied from interface:FilterIndicates whether a given element is filtered or not.- Parameters:
element- the element to be tested- Returns:
- true if the element is filtered, false otherwise
-
clearFilter
public void clearFilter() -
clearFilterBy
-
isFilteredBy
Description copied from interface:FilterIndicates whether a given element is filtered or not by the given locksmith.- Parameters:
element- the element to be testedlocksmith- the object used to filter the element- Returns:
- true if the element is filtered, false otherwise
-
getFilteredCount
public int getFilteredCount()Description copied from interface:FilterReturns the number of elements currently filtered.- Returns:
- the number of filtered elements.
-
setFiltered
-
setFilteredIterable
-
setFilteredState
-
iterator
-