class ExecutionCompletedEvent<R> extends ExecutionEvent {
  private final R result;
  private final Throwable exception;

  public ExecutionCompletedEvent(R result, Throwable exception, ExecutionContext<R> context) {
    super(context);
    this.result = result;
    this.exception = exception;
  }

  /**
   * Returns the failure that preceded the event, else {@code null} if there was none.
   */
  public Throwable getException() {
    return exception;
  }

  /**
   * Returns the result that preceded the event, else {@code null} if there was none.
   */
  public R getResult() {
    return result;
  }

  @Override
  public String toString() {<FILL_FUNCTION_BODY>}
}

    return "ExecutionCompletedEvent[" + "result=" + result + ", exception=" + exception + ']';
  
<methods>public int getAttemptCount() ,public java.time.Duration getElapsedAttemptTime() ,public java.time.Duration getElapsedTime() ,public int getExecutionCount() ,public Optional<java.time.Instant> getStartTime() ,public boolean isFirstAttempt() ,public boolean isRetry() <variables>private final non-sealed ExecutionContext<?> context