Interface TunableMutator<T extends TunableHandler,S>

Type Parameters:
T - The specific type of TunableHandler used to process the tunables.
S - The type of configuration object returned by this TunableMutator.

public interface TunableMutator<T extends TunableHandler,S>
This is a type of tunable interceptor that reads and modifies the values annotated with the Tunable annotation. Only one TunableMutator will be used by a given TaskManager, and that is defined by the TaskManager itself. You control which TunableMutator gets used by choosing the appropriate TaskManager.
When implementing this interface, it is recommended that you use the AbstractTunableInterceptor class to do so.

Module: work-api

To use this in your app, include the following dependency in your POM:

<dependency>
    <groupId>org.cytoscape</groupId>
    <artifactId>work-api</artifactId>
</dependency>

Cytoscape Backwards Compatibility (API Interface): We expect that this interface will be used but not implemented by developers using this interface. As such, we reserve the right to add methods to the interface as part of minor version upgrades. We will not remove methods for any changes other than major version upgrades.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the configuration object used to mutate the tunables.
    void
    Used configure the TunableMutator so that it builds its configuration object in the correct location.
    boolean
    This method is called to validate and then set the values for fields and methods annotated with the Tunable annotation.
  • Method Details

    • setConfigurationContext

      void setConfigurationContext(Object o)
      Used configure the TunableMutator so that it builds its configuration object in the correct location. For instance, a GUI based TunableMutator might call this method with a JPanel, indicating that the TunableMutator should build its configuration within that JPanel. This method may be a no-op depending on the type of configuration.
      Parameters:
      o - The context object in which the configuration will be built.
    • buildConfiguration

      S buildConfiguration(Object o)
      Returns the configuration object used to mutate the tunables.
      Parameters:
      o - The object containing the fields and methods annotated with the Tunable annotation.
      Returns:
      the configuration object used to mutate the tunables.
    • validateAndWriteBack

      boolean validateAndWriteBack(Object o)
      This method is called to validate and then set the values for fields and methods annotated with the Tunable annotation.
      Parameters:
      o - The object containing the fields and methods annotated with the Tunable annotation.
      Returns:
      Whether the tunables were successfully changed.