org.apache.tinkerpop.gremlin.process.traversal.step.branch

## 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, TraversalOptionParent<M,S,E>, TraversalParent

      public final class ChooseStep<S,E,M>
      extends BranchStep<S,E,M>

  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:
    Serialized Form

- - ### Nested Class Summary

    - ### 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.TraversalOptionParent

      `TraversalOptionParent.Pick`

  - ### Field Summary

    - ### Fields inherited from class org.apache.tinkerpop.gremlin.process.traversal.step.branch.BranchStep

      `branchTraversal, traversalOptions, traversalPickOptions`

    - ### 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 and Description
    `ChooseStep(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

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addGlobalChildOption(M pickToken, Traversal.Admin<S,E> traversalOption)`

    - ### Methods inherited from class org.apache.tinkerpop.gremlin.process.traversal.step.branch.BranchStep

      `clone, computerAlgorithm, getGlobalChildren, getLocalChildren, getRequirements, hashCode, reset, setBranchTraversal, setTraversal, standardAlgorithm, toString`

    - ### Methods inherited from class org.apache.tinkerpop.gremlin.process.traversal.step.util.ComputerAwareStep

      `onGraphComputer, processNextStart`

    - ### Methods inherited from class org.apache.tinkerpop.gremlin.process.traversal.step.util.AbstractStep

      `addLabel, addStart, addStarts, equals, getId, getLabels, getNextStep, getPreviousStep, getStarts, getTraversal, hasNext, hasStarts, isTraverserStepIdAndLabelsSetByChild, next, prepareTraversalForNextStep, removeLabel, setId, setNextStep, setPreviousStep`

    - ### 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.TraversalParent

      `addGlobalChild, addLocalChild, asStep, close, getSelfAndChildRequirements, integrateChild, removeGlobalChild, removeLocalChild, replaceLocalChild`

    - ### Methods inherited from interface org.apache.tinkerpop.gremlin.process.traversal.step.GraphComputing

      `atMaster, atMaster`

    - ### Methods inherited from interface org.apache.tinkerpop.gremlin.process.traversal.Step

      `equals`

    - ### Methods inherited from interface java.util.Iterator

      `forEachRemaining, remove`

- - ### Constructor Detail

    - #### ChooseStep

          public ChooseStep(Traversal.Admin traversal,
                            Traversal.Admin<S,M> choiceTraversal)

    - #### ChooseStep

          public ChooseStep(Traversal.Admin traversal,
                            Traversal.Admin<S,?> predicateTraversal,
                            Traversal.Admin<S,E> trueChoice,
                            Traversal.Admin<S,E> falseChoice)

  - ### Method Detail

    - #### addGlobalChildOption

          public void addGlobalChildOption(M pickToken,
                                           Traversal.Admin<S,E> traversalOption)

      Specified by:
        `addGlobalChildOption` in interface `TraversalOptionParent<M,S,E>`
      Overrides:
        `addGlobalChildOption` in class `BranchStep<S,E,M>`

Copyright © 2013–2022 Apache Software Foundation. All rights reserved.