Interface Operation<T>

Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface Operation<T>
Represents a computation that can be executed on a backend.

This is a functional interface that can be implemented as a lambda:

Operation<Double> op = ctx -> Math.sqrt(2.0);

Since:
1.0
Author:
Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
  • Method Summary

    Modifier and Type
    Method
    Description
    Computes the result using the given execution context.
  • Method Details

    • compute

      T compute(ExecutionContext context)
      Computes the result using the given execution context.
      Parameters:
      context - the execution context providing backend-specific resources
      Returns:
      the computation result