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>
public abstract class AbstractTransformer<C,E> extends Object implements Transformer<C,E>
A convenience base class for Transformers. This class provides a thread-safe implementation of listener registration, removal and notification.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 (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.
-
-
Constructor Summary
Constructors Constructor Description AbstractTransformer()
Creates a new AbstractTransformer.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addListener(TransformerListener listener)
Subscribes the given listener to changes in thisTransformer
's parameters.protected void
notifyListeners()
Notifies any registered listeners that this transformer's settings have changed.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
-
-
-
-
Method Detail
-
addListener
public final void addListener(TransformerListener listener)
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
public final void removeListener(TransformerListener listener)
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.
-
-