All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.codepoetics.fluvius.api.Operation Maven / Gradle / Ivy

package com.codepoetics.fluvius.api;

import com.codepoetics.fluvius.api.scratchpad.Scratchpad;

import java.io.Serializable;

/**
 * An Operation accepts a Scratchpad, and returns a value of some type.
 *
 * @param  The type of the value returned by the Operation.
 */
public interface Operation extends Serializable {
  /**
   * Get the name of this Operation.
   *
   * @return The name of this Operation.
   */
  String getName();

  /**
   * Run this Operation against the supplied Scratchpad.
   *
   * @param scratchpad The Scratchpad to run this Operation against.
   * @return The resulting value.
   */
  T run(Scratchpad scratchpad) throws Exception;
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy