LambdaUtils (Apache Hadoop Common 3.5.0 API)
Description: declaration: package: org.apache.hadoop.util, class: LambdaUtils

Package org.apache.hadoop.util

# Class LambdaUtils

java.lang.Object
org.apache.hadoop.util.LambdaUtils

@Private @Unstable public final class LambdaUtils extends Object
Lambda-expression utilities be they generic or specific to Hadoop datatypes.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static <T> CompletableFuture<T>`
  `eval(CompletableFuture<T> result, Callable<T> call)`
  Utility method to evaluate a callable and fill in the future with the result or the exception raised.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Method Details

  - ### eval

    public static <T> CompletableFuture<T> eval(CompletableFuture<T> result, Callable<T> call)
    Utility method to evaluate a callable and fill in the future with the result or the exception raised. Once this method returns, the future will have been evaluated to either a return value or an exception.
    Type Parameters:
      `T` - type of future
    Parameters:
      `result` - future for the result.
      `call` - callable to invoke.
    Returns:
      the future passed in