CompletableFuture.getNow

Returns the result value (or throws any encountered exception) if completed, else returns the given valueIfAbsent.

@param valueIfAbsent the value to return if not completed @return the result value, if completed, else the given valueIfAbsent @throws CancellationException if the computation was cancelled @throws CompletionException if this future completed exceptionally or a completion computation threw an exception

  1. void getNow()
  2. T getNow(T valueIfAbsent)
    class CompletableFuture(T)
    static if(!(is(T == void)))
    T
    getNow

Meta