Package com.macrofocus.filter
Class SimpleIndexFilter<E>
- java.lang.Object
-
- com.macrofocus.filter.AbstractFilter<E>
-
- com.macrofocus.filter.AbstractIndexFilter<E>
-
- com.macrofocus.filter.AbstractMutableIndexFilter<E>
-
- com.macrofocus.filter.SimpleIndexFilter<E>
-
- All Implemented Interfaces:
Filter<E>
,IndexFilter<E>
,MutableFilter<E>
,MutableIndexFilter<E>
public class SimpleIndexFilter<E> extends AbstractMutableIndexFilter<E>
As long as an index hasn't been set (presumably by SubsetDataFrame), then the responsability is deferred to the underlying input filter.
-
-
Field Summary
-
Fields inherited from class com.macrofocus.filter.AbstractIndexFilter
filteredCount, index
-
-
Constructor Summary
Constructors Constructor Description SimpleIndexFilter()
SimpleIndexFilter(MutableFilter<E> inputFilter)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clearFilter()
void
clearFilter(java.lang.Object locksmith)
int
getFilteredCount()
Returns the number of elements currently filtered.MutableFilter<E>
getInputFilter()
boolean
isActive()
Indicates whether at least one element is currently filtered.boolean
isEnabled()
boolean
isFiltered(E element)
Indicates whether a given element is filtered or not.boolean
isFiltered(E element, java.lang.Object locksmith)
Indicates whether a given element is filtered or not by the given locksmith.void
setEnabled(boolean enabled)
void
setFiltered(E element, boolean filtered, java.lang.Object locksmith)
void
setFiltered(java.lang.Iterable<E> elements, boolean filtered, java.lang.Object locksmith)
void
setFiltered(java.lang.Iterable<E> filtered, java.lang.Iterable<E> unfiltered, java.lang.Object locksmith)
-
Methods inherited from class com.macrofocus.filter.AbstractMutableIndexFilter
setIndex
-
Methods inherited from class com.macrofocus.filter.AbstractFilter
addFilterListener, addWeakFilterListener, notifyFilteredChanged, removeFilterListener, removeFilterListeners
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.macrofocus.filter.Filter
addFilterListener, addWeakFilterListener, removeFilterListener, removeFilterListeners
-
-
-
-
Constructor Detail
-
SimpleIndexFilter
public SimpleIndexFilter()
-
SimpleIndexFilter
public SimpleIndexFilter(MutableFilter<E> inputFilter)
-
-
Method Detail
-
getInputFilter
public MutableFilter<E> getInputFilter()
-
isActive
public boolean isActive()
Description copied from interface:Filter
Indicates whether at least one element is currently filtered.
-
getFilteredCount
public int getFilteredCount()
Description copied from interface:Filter
Returns the number of elements currently filtered.- Specified by:
getFilteredCount
in interfaceFilter<E>
- Overrides:
getFilteredCount
in classAbstractIndexFilter<E>
- Returns:
- the number of filtered elements.
-
isFiltered
public boolean isFiltered(E element)
Description copied from interface:Filter
Indicates whether a given element is filtered or not.- Specified by:
isFiltered
in interfaceFilter<E>
- Overrides:
isFiltered
in classAbstractIndexFilter<E>
- Parameters:
element
- the element to be tested- Returns:
- true if the element is filtered, false otherwise
-
isEnabled
public boolean isEnabled()
-
isFiltered
public boolean isFiltered(E element, java.lang.Object locksmith)
Description copied from interface:Filter
Indicates 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
-
setFiltered
public void setFiltered(E element, boolean filtered, java.lang.Object locksmith)
-
setFiltered
public void setFiltered(java.lang.Iterable<E> elements, boolean filtered, java.lang.Object locksmith)
-
setFiltered
public void setFiltered(java.lang.Iterable<E> filtered, java.lang.Iterable<E> unfiltered, java.lang.Object locksmith)
-
clearFilter
public void clearFilter()
-
clearFilter
public void clearFilter(java.lang.Object locksmith)
-
setEnabled
public void setEnabled(boolean enabled)
- Specified by:
setEnabled
in interfaceMutableFilter<E>
- Overrides:
setEnabled
in classAbstractMutableIndexFilter<E>
-
-