@Override public boolean hasNext() throws RippleException { while (true) { if (solutions.size() > 0) { return true; } else if (intermediates.size() > 0) { reduce(intermediates.remove(0)); } else { return false; } } }
@Override public void apply(final RippleList arg, final Sink<RippleList> solutions, final ModelConnection mc) throws RippleException { try { try (CloseableIteration<RippleList, RippleException> iter = new LazyEvaluatingIterator(arg, mc)) { while (iter.hasNext() && !stopped) { solutions.accept(iter.next()); } } } finally { stopped = false; } } }
= new LazyEvaluatingIterator(stack, modelConnection); = new LazyEvaluatingIterator(stack, modelConnection);