/** * Get the next object emitted from the pipeline. * If no such object exists, then a NoSuchElementException is thrown. * * @return the next emitted object */ public E next() { return this.endPipe.next(); }
public E processNextStart() { return this.pipe.next(); }
public S processNextStart() { final S s = this.starts.next(); this.expando.add(s); try { while (true) { this.pipe.next(); } } catch (final NoSuchElementException e) { } return s; }
public S processNextStart() { while (true) { final S s = this.starts.next(); for (Pipe<S, Boolean> pipe : this.pipes) { pipe.setStarts(new SingleIterator<S>(s)); if (pipe.next()) { return s; } } } }
@Override public Map<String, Object> next() { Map<String, Object> results = new HashMap<>(); Object next = pipe.next(); if (next instanceof Vertex) { results.put(gremlinExpression.getResultName(), next); } else if (next instanceof Edge) { results.put(gremlinExpression.getResultName(), next); } else if (next instanceof Map) { @SuppressWarnings("unchecked") Map<String, Object> map = (Map<String, Object>) next; results.putAll(map); } else { results.put("unknown_type", next); } return results; }
public S processNextStart() { while (true) { final Pipe pipe = this.pipes.get(this.current); if (pipe.hasNext()) { return (S) pipe.next(); } else { this.current = (this.current + 1) % this.total; if (this.current == 0) { throw FastNoSuchElementException.instance(); } } } }
public S processNextStart() { while (true) { final S s = this.starts.next(); boolean and = true; for (final Pipe<S, Boolean> pipe : this.pipes) { pipe.setStarts(new SingleIterator<S>(s)); if (!pipe.next()) { and = false; break; } } if (and) return s; } }
public S processNextStart() { while (true) { final S s = this.starts.next(); this.expando.add(s); if (this.pipe.hasNext()) { try { while (true) { this.pipe.next(); } } catch (final NoSuchElementException e) { } return s; } } }
public S processNextStart() { int counter = 0; while (true) { counter++; final Pipe currentPipe = this.pipes.get(this.current); if (currentPipe.hasNext()) { final S s = (S) currentPipe.next(); this.current = (this.current + 1) % this.total; return s; } else if (counter == this.total) { throw FastNoSuchElementException.instance(); } else { this.current = (this.current + 1) % this.total; } } }
public S processNextStart() { while (true) { if (!this.pipe.hasNext()) this.pipe = new PipesPipeline(this.starts.next().entrySet()).order(this.compareFunction).transform(new PipeFunction<Map.Entry, Object>() { public Object compute(final Map.Entry entry) { return entry.getKey(); } }); else return (S) this.pipe.next(); } }
this.incrTotalResets(); return iterator.next(); } else { this.current = this.queue.remove();
protected S processNextStart() { while (true) { final S s = this.pipe.next(); final LoopBundle<S> loopBundle; if (this.pathEnabled) loopBundle = new LoopBundle<S>(s, this.getCurrentPath(), this.getLoops()); else loopBundle = new LoopBundle<S>(s, null, this.getLoops()); if (whileFunction.compute(loopBundle)) { this.expando.add(loopBundle); if (null != emitFunction && emitFunction.compute(loopBundle)) return s; } else { if (emitFunction == null || emitFunction.compute(loopBundle)) return s; } } }