class TimeoutImpl<R> implements Timeout<R> {
  private final TimeoutConfig<R> config;

  public TimeoutImpl(TimeoutConfig<R> config) {
    this.config = config;
  }

  @Override
  public TimeoutConfig<R> getConfig() {
    return config;
  }

  @Override
  public PolicyExecutor<R> toExecutor(int policyIndex) {
    return new TimeoutExecutor<>(this, policyIndex);
  }

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

    return "Timeout[timeout=" + config.getTimeout() + ", interruptable=" + config.canInterrupt() + ']';
  
<no_super_class>