- Type Parameters:
C- The context type of the elements this
E- The element type this
- All Superinterfaces:
- All Known Subinterfaces:
public interface Filter<C,
extends Transformer<C, E>
A transformer that decides whether to accept or reject elements. To make a custom
Filteravailable in Cytoscape, create an
FilterFactorythat constructs the custom
Filter, and register the factory as an OSGi service. To make the transformer show up in the UI, create a
TransformerViewFactoryand register it as an OSGi service. The
TransformerViewFactoryneed to have the same id.
Cytoscape Backwards Compatibility (SPI Interface): We expect that this interface will be implemented. Therefore to maintain backwards compatibility this interface will only be modified for major version updates.
To use this in your app, include the following dependency in your POM:
<dependency> <groupId>org.cytoscape</groupId> <artifactId>filter-api</artifactId> </dependency>
trueif this filter accepts the given element from
context- the context object of the transformed element.
element- the element to transform.
trueif this filter accepts the given element.
isAlwaysFalsedefault boolean isAlwaysFalse()Returns true if the accepts() method will always return false for all inputs. This is an optimization to avoid running the filter if its just going to fail on all input anyway. This typically happens when the filter is not fully configured, for example a column filter might still be displaying "choose column".