Interface InvokeAndGet<T,R>

Type Parameters:
T - the type of the input to the run method
R - the type of the result of the run method
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 InvokeAndGet<T,R>
Functional interface representing an operation that takes a single argument and returns a result, allowing for checked exceptions to be thrown during its execution.
Author:
Sergey Grachev
  • Method Summary

    Modifier and Type
    Method
    Description
    run(T object)
    Executes the operation using the specified argument.
  • Method Details

    • run

      R run(T object) throws Exception
      Executes the operation using the specified argument.
      Parameters:
      object - the input argument to the operation
      Returns:
      the result of the operation
      Throws:
      Exception - if an error occurs during the execution of the operation