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

Method clear

ZezeJava/ZezeJava/src/main/java/Zeze/Util/JsonWriter.java:221–232  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

219 }
220
221 public @NotNull JsonWriter clear() { // leave the empty head block
222 Block head = ensureNotNull(tail.next);
223 for (Block block = head.next; block != head; block = block.next)
224 allocator.free(ensureNotNull(block));
225 tail = head;
226 head.next = head;
227 buf = head.buf;
228 pos = 0;
229 size = 0;
230 tabs = 0;
231 return this;
232 }
233
234 public @NotNull JsonWriter free() { // can be reused by ensure()
235 for (Block block = tail.next; ; block = block.next) {

Callers 4

testDoubleRangeMethod · 0.95
testDoubleRandomMethod · 0.95
toCompactStringMethod · 0.95
toCompactBytesMethod · 0.95

Calls 2

ensureNotNullMethod · 0.80
freeMethod · 0.65

Tested by 2

testDoubleRangeMethod · 0.76
testDoubleRandomMethod · 0.76