MCPcopy Create free account
hub / github.com/e2wugui/zeze / erase

Method erase

ZezeJava/ZezeJava/src/main/java/Zeze/Util/KVList.java:389–403  ·  view source on GitHub ↗
(int fromIdx, int toIdx)

Source from the content-addressed store, hash-verified

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;

Callers 14

LoopMethod · 0.45
OnRecvMethod · 0.45
OnSendMethod · 0.45
SendMethod · 0.45
RemoveRpcContextMethod · 0.45
UpdateMethod · 0.45
uiThreadScheduleCountFunction · 0.45
closeMethod · 0.45
removeMethod · 0.45
eraseVectorMethod · 0.45
eraseVectorMethod · 0.45
eraseVectorMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected