public class BranchStep<S,E,M> extends ComputerAwareStep<S,E> implements TraversalOptionParent<M,S,E>
ComputerAwareStep.EndStep<S>
TraversalOptionParent.Pick
Modifier and Type | Field and Description |
---|---|
protected Traversal.Admin<S,M> |
branchTraversal |
protected Map<M,List<Traversal.Admin<S,E>>> |
traversalOptions |
id, labels, nextEnd, nextStep, previousStep, starts, traversal, traverserStepIdAndLabelsSetByChild
Constructor and Description |
---|
BranchStep(Traversal.Admin traversal) |
Modifier and Type | Method and Description |
---|---|
void |
addGlobalChildOption(M pickToken,
Traversal.Admin<S,E> traversalOption) |
BranchStep<S,E,M> |
clone()
Cloning is used to duplicate steps for the purpose of traversal optimization and OLTP replication.
|
protected Iterator<Traverser.Admin<E>> |
computerAlgorithm() |
List<Traversal.Admin<S,E>> |
getGlobalChildren() |
List<Traversal.Admin<S,M>> |
getLocalChildren() |
Set<TraverserRequirement> |
getRequirements()
Provide the necessary
TraverserRequirement that must be met by the traverser in order for the step to function properly. |
int |
hashCode() |
void |
reset()
Reset the state of the step such that it has no incoming starts.
|
void |
setBranchTraversal(Traversal.Admin<S,M> branchTraversal) |
void |
setTraversal(Traversal.Admin<?,?> parentTraversal)
Set the
Traversal that this step is contained within. |
protected Iterator<Traverser.Admin<E>> |
standardAlgorithm() |
String |
toString() |
onGraphComputer, processNextStart
addLabel, addStart, addStarts, equals, getId, getLabels, getNextStep, getPreviousStep, getTraversal, hasNext, next, removeLabel, setId, setNextStep, setPreviousStep
finalize, getClass, notify, notifyAll, wait, wait, wait
addGlobalChild, addLocalChild, asStep, getSelfAndChildRequirements, integrateChild, removeGlobalChild, removeLocalChild
forEachRemaining, remove
protected Traversal.Admin<S,M> branchTraversal
public BranchStep(Traversal.Admin traversal)
public void setBranchTraversal(Traversal.Admin<S,M> branchTraversal)
public void addGlobalChildOption(M pickToken, Traversal.Admin<S,E> traversalOption)
addGlobalChildOption
in interface TraversalOptionParent<M,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.getRequirements
in interface Step<S,E>
public List<Traversal.Admin<S,E>> getGlobalChildren()
getGlobalChildren
in interface TraversalParent
public List<Traversal.Admin<S,M>> getLocalChildren()
getLocalChildren
in interface TraversalParent
protected Iterator<Traverser.Admin<E>> standardAlgorithm()
standardAlgorithm
in class ComputerAwareStep<S,E>
protected Iterator<Traverser.Admin<E>> computerAlgorithm()
computerAlgorithm
in class ComputerAwareStep<S,E>
public BranchStep<S,E,M> clone()
Step
EmptyStep
.public void setTraversal(Traversal.Admin<?,?> parentTraversal)
Step
Traversal
that this step is contained within.setTraversal
in interface Step<S,E>
setTraversal
in class AbstractStep<S,E>
parentTraversal
- the new traversal for this steppublic int hashCode()
hashCode
in class AbstractStep<S,E>
public String toString()
toString
in class AbstractStep<S,E>
public void reset()
Step
Copyright © 2013–2016 Apache Software Foundation. All rights reserved.