/** * Internals of findWithContinuation implementation which allows control over functor filtering. */ private ExtendedIterator<Triple> findWithContinuation( TriplePattern pattern, Finder continuation, boolean filter) { checkOpen(); if (!isPrepared) prepare(); ExtendedIterator<Triple> result = null; if (fdata == null) { result = fdeductions.findWithContinuation(pattern, continuation); } else { if (continuation == null) { result = fdata.findWithContinuation(pattern, fdeductions); } else { result = fdata.findWithContinuation(pattern, FinderUtil.cascade(fdeductions, continuation)); } } if (filter && filterFunctors) { return result.filterDrop(Functor.acceptFilter); } else { return result; } }
@Override protected ExtendedIterator<Triple> processMethod() throws AsyncException { checkOpen(); if (!isPrepared) prepare(getHandler("")); ExtendedIterator<Triple> result = null; if (fdata == null) { result = fdeductions.findWithContinuation(getHandler("result"), pattern, continuation); } else { if (continuation == null) { result = fdata.findWithContinuation(getHandler("result"), pattern, fdeductions); } else { result = fdata.findWithContinuation( getHandler("result"), pattern, FinderUtil.cascade(fdeductions, continuation)); } } if (filter && filterFunctors) { return result.filterDrop(Functor.acceptFilter); } else { return result; } }
@Override public T removeNext() { lazy(); return it.removeNext(); }
@Override public void close() { lazy(); it.close(); }
@Override public void remove() { lazy(); it.remove(); }
@Override public T next() { lazy(); return it.next(); }
@Override public boolean hasNext() { lazy(); return it.hasNext(); }