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
public interface Transformer<C,E>
Transforms a stream of elements from a particular context. The output of aTransformer
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 subinterfacesHolisticTransformer
,ElementTransformer
, andFilter
.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>
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.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addListener(TransformerListener listener)
Subscribes the given listener to changes in thisTransformer
's parameters.Class<C>
getContextType()
Returns the type of the context object thisTransformer
is compatible with.Class<E>
getElementType()
Returns the type of the elements thisTransformer
is compatible with.String
getId()
Returns the unique id of this type ofTransformer
.String
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 Detail
-
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
Class<C> getContextType()
Returns the type of the context object thisTransformer
is compatible with.- Returns:
- the type of the context object.
-
getElementType
Class<E> getElementType()
Returns the type of the elements thisTransformer
is compatible with.- Returns:
- the type of the elements.
-
addListener
void addListener(TransformerListener listener)
Subscribes the given listener to changes in thisTransformer
's parameters.- Parameters:
listener
- the object that should be notified of changes to thisTransformer
.
-
removeListener
void removeListener(TransformerListener listener)
Unsubscribes the given listener from changes in thisTransformer
's parameters.- Parameters:
listener
- the object that should no longer be notified of changes to thisTransformer
.
-
-