(int fromIdx, int toIdx)
| 387 | } |
| 388 | |
| 389 | public @NotNull KVList<K, V> erase(int fromIdx, int toIdx) { |
| 390 | int n = count; |
| 391 | if (fromIdx < 0) |
| 392 | fromIdx = 0; |
| 393 | if (fromIdx >= n || fromIdx >= toIdx) |
| 394 | return this; |
| 395 | if (toIdx >= n) |
| 396 | count = fromIdx; |
| 397 | else { |
| 398 | System.arraycopy(keys, toIdx, keys, fromIdx, n -= toIdx); |
| 399 | System.arraycopy(values, toIdx, values, fromIdx, n); |
| 400 | count = n + fromIdx; |
| 401 | } |
| 402 | return this; |
| 403 | } |
| 404 | |
| 405 | public @NotNull KVList<K, V> eraseFront(int count) { |
| 406 | int n = this.count; |
no outgoing calls
no test coverage detected