Package org.cytoscape.filter.model
Interface Transformer<C,E>
- Type Parameters:
C
- The context type of the elements thisTransformer
operates on.E
- The element type thisTransformer
operates on.
- All Known Subinterfaces:
CompositeFilter<C,E>
,ElementTransformer<C,E>
,Filter<C,E>
,HolisticTransformer<C,E>
,SubFilterTransformer<C,E>
,ValidatableTransformer<C,E>
- All Known Implementing Classes:
AbstractTransformer
,AbstractValidatableTransformer
public interface Transformer<C,E>
Transforms a stream of elements from a particular context. The output
of a
Transformer
must be a subset of the elements of its context.
However, the output need not be a subset of its input.
The input and output mechanisms of Transformers are defined by the
subinterfaces HolisticTransformer
, ElementTransformer
, and
Filter
.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.
Module: filter-api
To use this in your app, include the following dependency in your POM:
<dependency> <groupId>org.cytoscape</groupId> <artifactId>filter-api</artifactId> </dependency>
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addListener(TransformerListener listener)
Subscribes the given listener to changes in thisTransformer
's parameters.Returns the type of the context object thisTransformer
is compatible with.Returns the type of the elements thisTransformer
is compatible with.getId()
Returns the unique id of this type ofTransformer
.getName()
Returns the user-friendly display name of this type ofTransformer
.void
removeListener(TransformerListener listener)
Unsubscribes the given listener from changes in thisTransformer
's parameters.
-
Method Details
-
getName
String getName()Returns the user-friendly display name of this type ofTransformer
.- Returns:
- the user-friendly display name of this type of
Transformer
.
-
getId
String getId()Returns the unique id of this type ofTransformer
.- Returns:
- the unique id of this type of
Transformer
.
-
getContextType
Returns the type of the context object thisTransformer
is compatible with.- Returns:
- the type of the context object.
-
getElementType
Returns the type of the elements thisTransformer
is compatible with.- Returns:
- the type of the elements.
-
addListener
Subscribes the given listener to changes in thisTransformer
's parameters.- Parameters:
listener
- the object that should be notified of changes to thisTransformer
.
-
removeListener
Unsubscribes the given listener from changes in thisTransformer
's parameters.- Parameters:
listener
- the object that should no longer be notified of changes to thisTransformer
.
-