Class AbstractTransformer<C,E>

java.lang.Object
org.cytoscape.filter.model.AbstractTransformer<C,E>
Type Parameters:
C - The context type of the elements this Transformer operates on.
E - The element type this Transformer operates on.
All Implemented Interfaces:
Transformer<C,E>
Direct Known Subclasses:
AbstractValidatableTransformer

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.

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 Details

    • AbstractTransformer

      public AbstractTransformer()
      Creates a new AbstractTransformer.
  • Method Details

    • addListener

      public final void addListener(TransformerListener listener)
      Description copied from interface: Transformer
      Subscribes the given listener to changes in this Transformer's parameters.
      Specified by:
      addListener in interface Transformer<C,E>
      Parameters:
      listener - the object that should be notified of changes to this Transformer.
    • removeListener

      public final void removeListener(TransformerListener listener)
      Description copied from interface: Transformer
      Unsubscribes the given listener from changes in this Transformer's parameters.
      Specified by:
      removeListener in interface Transformer<C,E>
      Parameters:
      listener - the object that should no longer be notified of changes to this Transformer.
    • notifyListeners

      protected final void notifyListeners()
      Notifies any registered listeners that this transformer's settings have changed.