MCPcopy Index your code
hub / github.com/clojure/clojure / ChunkBuffer

Class ChunkBuffer

src/jvm/clojure/lang/ChunkBuffer.java:15–37  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

13package clojure.lang;
14
15final public class ChunkBuffer implements Counted{
16 Object[] buffer;
17 int end;
18
19public ChunkBuffer(int capacity){
20 buffer = new Object[capacity];
21 end = 0;
22}
23
24public void add(Object o){
25 buffer[end++] = o;
26}
27
28public IChunk chunk(){
29 ArrayChunk ret = new ArrayChunk(buffer, 0, end);
30 buffer = null;
31 return ret;
32}
33
34public int count(){
35 return end;
36}
37}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected