Class CallbackExtension

java.lang.Object
org.moeaframework.algorithm.extension.CallbackExtension
All Implemented Interfaces:
Extension

public class CallbackExtension extends Object implements Extension
Extension that invokes a callback function every iteration.
  • Constructor Details

    • CallbackExtension

      public CallbackExtension(Consumer<Algorithm> callback)
      Creates a new callback extension.
      Parameters:
      callback - the callback function
  • Method Details

    • onStep

      public void onStep(Algorithm algorithm)
      Description copied from interface: Extension
      Called after each step of the algorithm.
      Specified by:
      onStep in interface Extension
      Parameters:
      algorithm - the algorithm associated with this extension