Class ChooseStep<S,E,M>
java.lang.Object
org.apache.tinkerpop.gremlin.process.traversal.step.util.AbstractStep<S,E>
org.apache.tinkerpop.gremlin.process.traversal.step.util.ComputerAwareStep<S,E>
org.apache.tinkerpop.gremlin.process.traversal.step.branch.BranchStep<S,E,M>
org.apache.tinkerpop.gremlin.process.traversal.step.branch.ChooseStep<S,E,M>
- All Implemented Interfaces:
Serializable,AutoCloseable,Cloneable,Iterator<Traverser.Admin<E>>,Step<S,,E> GraphComputing,PopContaining,TraversalOptionParent<M,,S, E> TraversalParent
A step which offers a choice of two or more Traversals to take.
- Author:
- Joshua Shinavier (http://fortytwo.net), Marko A. Rodriguez (http://markorodriguez.com)
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumDefines the manner in which theChooseStepis configured to work.Nested classes/interfaces inherited from class org.apache.tinkerpop.gremlin.process.traversal.step.util.ComputerAwareStep
ComputerAwareStep.EndStep<S>Nested classes/interfaces inherited from interface org.apache.tinkerpop.gremlin.process.traversal.step.PopContaining
PopContaining.PopInstruction -
Field Summary
Fields inherited from class org.apache.tinkerpop.gremlin.process.traversal.step.branch.BranchStep
branchTraversal, hasBarrier, traversalOptions, traversalPickOptionsFields inherited from class org.apache.tinkerpop.gremlin.process.traversal.step.util.AbstractStep
id, labels, nextEnd, nextStep, previousStep, starts, traversal, traverserStepIdAndLabelsSetByChild -
Constructor Summary
ConstructorsConstructorDescriptionChooseStep(Traversal.Admin traversal, Traversal.Admin<S, ?> predicateTraversal, Traversal.Admin<S, E> trueChoice, Traversal.Admin<S, E> falseChoice) ChooseStep(Traversal.Admin traversal, Traversal.Admin<S, M> choiceTraversal) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddChildOption(M pickToken, Traversal.Admin<S, E> traversalOption) Adds a child option to this ChooseStep.This method overrides the parent implementation to provide special handling forPicktokens.Step metadata that informs on howchoose()is configured to work.protected List<Traversal.Admin<S,E>> pickBranches(M choice) Selects which branches to execute based on the choice value.Methods inherited from class org.apache.tinkerpop.gremlin.process.traversal.step.branch.BranchStep
applyCurrentTraverser, clone, computerAlgorithm, getBranchTraversal, getGlobalChildren, getLocalChildren, getRequirements, getTraversalOptions, getTraversalPickOptions, hashCode, reset, setBranchTraversal, setTraversal, standardAlgorithm, toStringMethods inherited from class org.apache.tinkerpop.gremlin.process.traversal.step.util.ComputerAwareStep
onGraphComputer, processNextStartMethods inherited from class org.apache.tinkerpop.gremlin.process.traversal.step.util.AbstractStep
addLabel, addStart, addStarts, clearLabels, equals, getId, getLabels, getNextStep, getPreviousStep, getStarts, getTraversal, hasNext, hasStarts, isTraverserStepIdAndLabelsSetByChild, next, prepareTraversalForNextStep, removeLabel, setId, setNextStep, setPreviousStepMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.tinkerpop.gremlin.process.traversal.step.GraphComputing
atMasterMethods inherited from interface java.util.Iterator
forEachRemaining, removeMethods inherited from interface org.apache.tinkerpop.gremlin.process.traversal.step.TraversalParent
addGlobalChild, addLocalChild, asStep, close, getPopInstructions, getSelfAndChildRequirements, integrateChild, removeGlobalChild, removeLocalChild, replaceLocalChild
-
Constructor Details
-
ChooseStep
-
ChooseStep
public ChooseStep(Traversal.Admin traversal, Traversal.Admin<S, ?> predicateTraversal, Traversal.Admin<S, E> trueChoice, Traversal.Admin<S, E> falseChoice)
-
-
Method Details
-
getChooseSemantics
Step metadata that informs on howchoose()is configured to work. -
addChildOption
Adds a child option to this ChooseStep.This method overrides the parent implementation to provide special handling forPicktokens.- Specified by:
addChildOptionin interfaceTraversalOptionParent<S,E, M> - Overrides:
addChildOptionin classBranchStep<S,E, M>
-
pickBranches
Selects which branches to execute based on the choice value.- Overrides:
pickBranchesin classBranchStep<S,E, M>
-