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

Method arrayFor

src/jvm/clojure/lang/PersistentVector.java:152–163  ·  view source on GitHub ↗
(int i)

Source from the content-addressed store, hash-verified

150}
151
152public Object[] arrayFor(int i){
153 if(i >= 0 && i < cnt)
154 {
155 if(i >= tailoff())
156 return tail;
157 Node node = root;
158 for(int level = shift; level > 0; level -= 5)
159 node = (Node) node.array[(i >>> level) & 0x01f];
160 return node.array;
161 }
162 throw new IndexOutOfBoundsException();
163}
164
165public Object nth(int i){
166 Object[] node = arrayFor(i);

Callers 13

nthMethod · 0.95
rangedIteratorMethod · 0.95
nextMethod · 0.95
rangedSpliteratorMethod · 0.95
tryAdvanceMethod · 0.95
forEachRemainingMethod · 0.95
reduceMethod · 0.95
kvreduceMethod · 0.95
dropMethod · 0.95
popMethod · 0.95
ChunkedSeqMethod · 0.45
reduceMethod · 0.45

Calls 1

tailoffMethod · 0.95

Tested by

no test coverage detected