class InterruptibleCharSequence implements CharSequence {

  private final CharSequence inner;

  public InterruptibleCharSequence(CharSequence inner) {
    super();
    this.inner = inner;
  }

  public char charAt(int index) {<FILL_FUNCTION_BODY>}

  public int length() {
    return inner.length();
  }

  public CharSequence subSequence(int start, int end) {
    return new InterruptibleCharSequence(inner.subSequence(start, end));
  }

  @NotNull
  @Override
  public String toString() {
    return inner.toString();
  }
}

    if (Thread.interrupted()) {
      throw new RuntimeException(new InterruptedException());
    }
    return inner.charAt(index);
  
<no_super_class>