Interface Task.Complete<T>

Type Parameters:
T - result type
Enclosing interface:
Task<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 static interface Task.Complete<T>
Completes a task.

  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    with(Try<? extends T> value)
    A function that takes a Try (success or failure) and returns the state of completion.
  • Method Details

    • with

      boolean with(Try<? extends T> value)
      A function that takes a Try (success or failure) and returns the state of completion.
      Parameters:
      value - the computation result
      Returns:
      true, if the task could be completed, otherwise false. Successive calls will result in false.