public final class FoldStep<S,E> extends ReducingBarrierStep<S,E>
Modifier and Type | Class and Description |
---|---|
static class |
FoldStep.FoldBiOperator<E> |
reducingBiOperator, seedSupplier
id, labels, nextEnd, nextStep, previousStep, starts, traversal, traverserStepIdAndLabelsSetByChild
Constructor and Description |
---|
FoldStep(Traversal.Admin traversal) |
FoldStep(Traversal.Admin traversal,
Supplier<E> seed,
BiFunction<E,S,E> foldFunction) |
Modifier and Type | Method and Description |
---|---|
Set<TraverserRequirement> |
getRequirements()
Provide the necessary
TraverserRequirement that must be met by the traverser in order for the step to
function properly. |
boolean |
isListFold() |
E |
projectTraverser(Traverser.Admin<S> traverser) |
addBarrier, clone, done, getBiOperator, getMemoryComputeKey, getSeedSupplier, hasNextBarrier, nextBarrier, processAllStarts, processNextStart, reset, setReducingBiOperator, setSeedSupplier
addLabel, addStart, addStarts, equals, getId, getLabels, getNextStep, getPreviousStep, getStarts, getTraversal, hashCode, hasNext, isTraverserStepIdAndLabelsSetByChild, next, prepareTraversalForNextStep, removeLabel, setId, setNextStep, setPreviousStep, setTraversal, toString
finalize, getClass, notify, notifyAll, wait, wait, wait
generateFinalResult
forEachRemaining, remove
public FoldStep(Traversal.Admin traversal)
public FoldStep(Traversal.Admin traversal, Supplier<E> seed, BiFunction<E,S,E> foldFunction)
public E projectTraverser(Traverser.Admin<S> traverser)
projectTraverser
in class ReducingBarrierStep<S,E>
public Set<TraverserRequirement> getRequirements()
Step
TraverserRequirement
that must be met by the traverser in order for the step to
function properly. The provided default implements returns an empty set.public boolean isListFold()
Copyright © 2013–2021 Apache Software Foundation. All rights reserved.