Class RepeatStep<S>
java.lang.Object
org.apache.tinkerpop.gremlin.process.traversal.step.util.AbstractStep<S,E>
org.apache.tinkerpop.gremlin.process.traversal.step.util.ComputerAwareStep<S,S>
org.apache.tinkerpop.gremlin.process.traversal.step.branch.RepeatStep<S>
- All Implemented Interfaces:
Serializable,AutoCloseable,Cloneable,Iterator<Traverser.Admin<S>>,Step<S,,S> GraphComputing,PopContaining,TraversalParent
- Author:
- Marko A. Rodriguez (http://markorodriguez.com)
- See Also:
-
Nested Class Summary
Nested ClassesNested 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
FieldsFields inherited from class org.apache.tinkerpop.gremlin.process.traversal.step.util.AbstractStep
id, labels, nextEnd, nextStep, previousStep, starts, traversal, traverserStepIdAndLabelsSetByChild -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <A,B, C extends Traversal<A, B>>
CaddEmitToTraversal(C traversal, Traversal.Admin<B, ?> emitPredicate) static <A,B, C extends Traversal<A, B>>
CaddRepeatToTraversal(C traversal, String loopName, Traversal.Admin<B, B> repeatTraversal) static <A,B, C extends Traversal<A, B>>
CaddRepeatToTraversal(C traversal, Traversal.Admin<B, B> repeatTraversal) static <A,B, C extends Traversal<A, B>>
CaddUntilToTraversal(C traversal, Traversal.Admin<B, ?> untilPredicate) clone()Cloning is used to duplicate steps for the purpose of traversal optimization and OLTP replication.protected Iterator<Traverser.Admin<S>>final booleandoEmit(Traverser.Admin<S> traverser, boolean emitFirst) final booleandoUntil(Traverser.Admin<S> traverser, boolean utilFirst) Traversal.Admin<S,?> Gets a list of all "global" child traversals for this step.List<Traversal.Admin<S,?>> Gets a list of all "local" child traversals for this step.Provide the necessaryTraverserRequirementthat must be met by the traverser in order for the step to function properly.Traversal.Admin<S,?> inthashCode()voidreset()Reset the state of the step such that it has no incoming starts.voidsetEmitTraversal(Traversal.Admin<S, ?> emitTraversal) voidsetLoopName(String loopName) voidsetRepeatTraversal(Traversal.Admin<S, S> repeatTraversal) voidsetTraversal(Traversal.Admin<?, ?> parentTraversal) Set theTraversalthat this step is contained within.voidsetUntilTraversal(Traversal.Admin<S, ?> untilTraversal) protected Iterator<Traverser.Admin<S>>toString()Methods 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
-
Field Details
-
untilFirst
public boolean untilFirst -
emitFirst
public boolean emitFirst
-
-
Constructor Details
-
RepeatStep
-
-
Method Details
-
getRequirements
Description copied from interface:StepProvide the necessaryTraverserRequirementthat must be met by the traverser in order for the step to function properly. The provided default implements returns an empty set.- Specified by:
getRequirementsin interfaceStep<S,S> - Returns:
- the set of requirements
-
setRepeatTraversal
-
setLoopName
-
getLoopName
-
setUntilTraversal
-
getUntilTraversal
-
setEmitTraversal
-
getEmitTraversal
-
getRepeatTraversal
-
getGlobalChildren
Description copied from interface:TraversalParentGets a list of all "global" child traversals for this step. A "global" traversal is one which evaluates across all of its parents incoming traversers at once. This is typically used in cases where the child traversal represents a branch of traversal flow. SeeBranchStepas an example.- Specified by:
getGlobalChildrenin interfaceTraversalParent
-
getLocalChildren
Description copied from interface:TraversalParentGets a list of all "local" child traversals for this step. A "local" traversal is one which is evaluated independently for each incoming traverser to the parent step. This is typically used in cases where the child is used to process or augment each traverser individually. SeeLocalSteporByModulatingas examples.- Specified by:
getLocalChildrenin interfaceTraversalParent
-
doUntil
-
doEmit
-
toString
- Overrides:
toStringin classAbstractStep<S,S>
-
reset
public void reset()Description copied from interface:StepReset the state of the step such that it has no incoming starts. Internal states are to be reset, but any sideEffect data structures are not to be recreated. -
clone
Description copied from interface:StepCloning is used to duplicate steps for the purpose of traversal optimization and OLTP replication. When cloning a step, it is important that the steps, the cloned step is equivalent to the state of the step whenStep.reset()is called. Moreover, the previous and next steps should be set toEmptyStep. -
setTraversal
Description copied from interface:StepSet theTraversalthat this step is contained within.- Specified by:
setTraversalin interfaceStep<S,S> - Overrides:
setTraversalin classAbstractStep<S,S> - Parameters:
parentTraversal- the new traversal for this step
-
hashCode
public int hashCode()- Overrides:
hashCodein classAbstractStep<S,S>
-
standardAlgorithm
- Specified by:
standardAlgorithmin classComputerAwareStep<S,S> - Throws:
NoSuchElementException
-
computerAlgorithm
- Specified by:
computerAlgorithmin classComputerAwareStep<S,S> - Throws:
NoSuchElementException
-
addRepeatToTraversal
public static <A,B, C addRepeatToTraversalC extends Traversal<A, B>> (C traversal, Traversal.Admin<B, B> repeatTraversal) -
addRepeatToTraversal
public static <A,B, C addRepeatToTraversalC extends Traversal<A, B>> (C traversal, String loopName, Traversal.Admin<B, B> repeatTraversal) -
addUntilToTraversal
public static <A,B, C addUntilToTraversalC extends Traversal<A, B>> (C traversal, Traversal.Admin<B, ?> untilPredicate) -
addEmitToTraversal
public static <A,B, C addEmitToTraversalC extends Traversal<A, B>> (C traversal, Traversal.Admin<B, ?> emitPredicate)
-