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

Method step

src/jvm/clojure/lang/TransformerIterator.java:66–94  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

64}
65
66private boolean step() {
67 if(next != NONE)
68 return true;
69
70 while (next == NONE) {
71 if(buffer.isEmpty()) {
72 if(completed) {
73 return false;
74 } else if (sourceIter.hasNext()) {
75 Object iter = null;
76 if(multi)
77 iter = xf.applyTo(RT.cons(null, sourceIter.next()));
78 else
79 iter = xf.invoke(null, sourceIter.next());
80
81 if(RT.isReduced(iter)) {
82 xf.invoke(null);
83 completed = true;
84 }
85 } else {
86 xf.invoke(null);
87 completed = true;
88 }
89 } else {
90 next = buffer.remove();
91 }
92 }
93 return true;
94}
95
96public boolean hasNext() {
97 return step();

Callers 1

hasNextMethod · 0.95

Calls 8

consMethod · 0.95
isReducedMethod · 0.95
isEmptyMethod · 0.65
applyToMethod · 0.65
nextMethod · 0.65
invokeMethod · 0.65
removeMethod · 0.65
hasNextMethod · 0.45

Tested by

no test coverage detected