(int size, int index)
| 340 | } |
| 341 | |
| 342 | private void move(int size, int index) { |
| 343 | int newCount; |
| 344 | if (value.length - count >= size) { |
| 345 | //if (!shared) { |
| 346 | // index == count case is no-op |
| 347 | System.arraycopy(value, index, value, index + size, count - index); |
| 348 | return; |
| 349 | /*} |
| 350 | newCount = value.length;*/ |
| 351 | } else { |
| 352 | newCount = Math.max(count + size, value.length*2 + 2); |
| 353 | } |
| 354 | |
| 355 | char[] newData = new char[newCount]; |
| 356 | System.arraycopy(value, 0, newData, 0, index); |
| 357 | // index == count case is no-op |
| 358 | System.arraycopy(value, index, newData, index + size, count - index); |
| 359 | value = newData; |
| 360 | //shared = false; |
| 361 | } |
| 362 | |
| 363 | java.lang.StringBuilder insert(int index, char[] chars){ |
| 364 | if (chars.length != 0) { |
no test coverage detected