Class FoldStep<S,E>
- java.lang.Object
-
- org.apache.tinkerpop.gremlin.process.traversal.step.util.AbstractStep<S,E>
-
- org.apache.tinkerpop.gremlin.process.traversal.step.util.ReducingBarrierStep<S,E>
-
- org.apache.tinkerpop.gremlin.process.traversal.step.map.FoldStep<S,E>
-
- All Implemented Interfaces:
Serializable
,Cloneable
,Iterator<Traverser.Admin<E>>
,Step<S,E>
,Barrier<E>
,Generating<E,E>
,MemoryComputing<E>
public final class FoldStep<S,E> extends ReducingBarrierStep<S,E>
- Author:
- Marko A. Rodriguez (http://markorodriguez.com)
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
FoldStep.FoldBiOperator<E>
-
Nested classes/interfaces inherited from class org.apache.tinkerpop.gremlin.process.traversal.step.util.ReducingBarrierStep
ReducingBarrierStep.NonEmittingSeed
-
-
Field Summary
-
Fields inherited from class org.apache.tinkerpop.gremlin.process.traversal.step.util.ReducingBarrierStep
hasProcessedOnce, NON_EMITTING_SEED, reducingBiOperator, seedSupplier
-
Fields inherited from class org.apache.tinkerpop.gremlin.process.traversal.step.util.AbstractStep
id, labels, nextEnd, nextStep, previousStep, starts, traversal, traverserStepIdAndLabelsSetByChild
-
-
Constructor Summary
Constructors Constructor Description FoldStep(Traversal.Admin traversal)
FoldStep(Traversal.Admin traversal, Supplier<E> seed, BiFunction<E,S,E> foldFunction)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Set<TraverserRequirement>
getRequirements()
Provide the necessaryTraverserRequirement
that must be met by the traverser in order for the step to function properly.boolean
isListFold()
E
projectTraverser(Traverser.Admin<S> traverser)
-
Methods inherited from class org.apache.tinkerpop.gremlin.process.traversal.step.util.ReducingBarrierStep
addBarrier, clone, done, generateSeedFromStarts, getBiOperator, getMemoryComputeKey, getSeedSupplier, hasNextBarrier, nextBarrier, processAllStarts, processNextStart, reset, setReducingBiOperator, setSeedSupplier
-
Methods inherited from class org.apache.tinkerpop.gremlin.process.traversal.step.util.AbstractStep
addLabel, addStart, addStarts, clearLabels, equals, getId, getLabels, getNextStep, getPreviousStep, getStarts, getTraversal, hashCode, hasNext, hasStarts, isTraverserStepIdAndLabelsSetByChild, next, prepareTraversalForNextStep, removeLabel, setId, setNextStep, setPreviousStep, setTraversal, toString
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.tinkerpop.gremlin.process.traversal.step.Generating
generateFinalResult
-
Methods inherited from interface java.util.Iterator
forEachRemaining, remove
-
-
-
-
Constructor Detail
-
FoldStep
public FoldStep(Traversal.Admin traversal)
-
FoldStep
public FoldStep(Traversal.Admin traversal, Supplier<E> seed, BiFunction<E,S,E> foldFunction)
-
-
Method Detail
-
projectTraverser
public E projectTraverser(Traverser.Admin<S> traverser)
- Specified by:
projectTraverser
in classReducingBarrierStep<S,E>
-
getRequirements
public Set<TraverserRequirement> getRequirements()
Description copied from interface:Step
Provide the necessaryTraverserRequirement
that must be met by the traverser in order for the step to function properly. The provided default implements returns an empty set.- Returns:
- the set of requirements
-
isListFold
public boolean isListFold()
-
-