Type Parameters:
I - the type of the input to the calculation
O - the type of the output of the calculation
All Known Implementing Classes:
Memoizer

public interface Computable<I,O>

Definition of an interface for a wrapper around a calculation that takes a single parameter and returns a result.

This interface allows for wrapping a calculation into a class so that it maybe passed around an application.

Since:
3.6
  • Method Summary

    Modifier and Type
    Method
    Description
    compute(I arg)
    This method carries out the given operation with the provided argument.
  • Method Details

    • compute

      O compute(I arg) throws InterruptedException
      This method carries out the given operation with the provided argument.
      Parameters:
      arg - the argument for the calculation
      Returns:
      the result of the calculation
      Throws:
      InterruptedException - thrown if the calculation is interrupted