Package org.cytoscape.filter.model
Class AbstractTransformer<C,E>
java.lang.Object
org.cytoscape.filter.model.AbstractTransformer<C,E>
- Type Parameters:
C
- The context type of the elements thisTransformer
operates on.E
- The element type thisTransformer
operates on.
- All Implemented Interfaces:
Transformer<C,
E>
- Direct Known Subclasses:
AbstractValidatableTransformer
A convenience base class for Transformers. This class provides a thread-safe
implementation of listener registration, removal and notification.
Cytoscape Backwards Compatibility (Abstract Class): This class is abstract and meant to be extended by users. This means that we may add methods for minor version updates. Methods will only be removed 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>
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionfinal void
addListener
(TransformerListener listener) Subscribes the given listener to changes in thisTransformer
's parameters.protected final void
Notifies any registered listeners that this transformer's settings have changed.final void
removeListener
(TransformerListener listener) Unsubscribes the given listener from changes in thisTransformer
's parameters.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.cytoscape.filter.model.Transformer
getContextType, getElementType, getId, getName
-
Constructor Details
-
AbstractTransformer
public AbstractTransformer()Creates a new AbstractTransformer.
-
-
Method Details
-
addListener
Description copied from interface:Transformer
Subscribes the given listener to changes in thisTransformer
's parameters.- Specified by:
addListener
in interfaceTransformer<C,
E> - Parameters:
listener
- the object that should be notified of changes to thisTransformer
.
-
removeListener
Description copied from interface:Transformer
Unsubscribes the given listener from changes in thisTransformer
's parameters.- Specified by:
removeListener
in interfaceTransformer<C,
E> - Parameters:
listener
- the object that should no longer be notified of changes to thisTransformer
.
-
notifyListeners
protected final void notifyListeners()Notifies any registered listeners that this transformer's settings have changed.
-