class ExecutionScheduledEvent<R> extends ExecutionEvent {
  private final R result;
  private final Throwable exception;
  private final Duration delay;

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

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

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

  /**
   * Returns the delay before the next execution attempt.
   */
  public Duration getDelay() {
    return delay;
  }

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

    return "ExecutionScheduledEvent[" + "result=" + result + ", exception=" + exception + ", delay=" + delay + ']';
  
<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