(int i)
| 113 | } |
| 114 | |
| 115 | public char charAt(int i) { |
| 116 | if (i < 0 || i >= length) { |
| 117 | throw new IndexOutOfBoundsException(); |
| 118 | } |
| 119 | |
| 120 | flush(); |
| 121 | |
| 122 | int index = length; |
| 123 | for (Cell c = chain; c != null; c = c.next) { |
| 124 | int start = index - c.value.length(); |
| 125 | index = start; |
| 126 | |
| 127 | if (i >= start) { |
| 128 | return c.value.charAt(i - start); |
| 129 | } |
| 130 | } |
| 131 | |
| 132 | throw new RuntimeException(); |
| 133 | } |
| 134 | |
| 135 | public StringBuilder insert(int i, String s) { |
| 136 | if (i < 0 || i > length) { |
no test coverage detected