public final class RepeatStep<S> extends ComputerAwareStep<S,S> implements TraversalParent
Modifier and Type | Class and Description |
---|---|
class |
RepeatStep.RepeatEndStep |
ComputerAwareStep.EndStep<S>
Modifier and Type | Field and Description |
---|---|
boolean |
emitFirst |
boolean |
untilFirst |
id, labels, nextEnd, nextStep, previousStep, starts, traversal, traverserStepIdSetByChild
Constructor and Description |
---|
RepeatStep(Traversal.Admin traversal) |
Modifier and Type | Method and Description |
---|---|
static <A,B,C extends Traversal<A,B>> |
addEmitToTraversal(C traversal,
Traversal.Admin<B,?> emitPredicate) |
static <A,B,C extends Traversal<A,B>> |
addRepeatToTraversal(C traversal,
Traversal.Admin<B,B> repeatTraversal) |
static <A,B,C extends Traversal<A,B>> |
addUntilToTraversal(C traversal,
Traversal.Admin<B,?> untilPredicate) |
RepeatStep<S> |
clone()
Cloning is used to duplicate steps for the purpose of traversal optimization and OLTP replication.
|
protected Iterator<Traverser<S>> |
computerAlgorithm() |
boolean |
doEmit(Traverser.Admin<S> traverser,
boolean emitFirst) |
boolean |
doUntil(Traverser.Admin<S> traverser,
boolean utilFirst) |
List<Traversal.Admin<S,S>> |
getGlobalChildren() |
List<Traversal.Admin<S,?>> |
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 |
setEmitTraversal(Traversal.Admin<S,?> emitTraversal) |
void |
setRepeatTraversal(Traversal.Admin<S,S> repeatTraversal) |
void |
setUntilTraversal(Traversal.Admin<S,?> untilTraversal) |
protected Iterator<Traverser<S>> |
standardAlgorithm() |
String |
toString() |
onEngine, processNextStart
addLabel, addStart, addStarts, equals, getId, getLabels, getNextStep, getPreviousStep, getTraversal, hasNext, next, removeLabel, reset, setId, setNextStep, setPreviousStep, setTraversal
finalize, getClass, notify, notifyAll, wait, wait, wait
addGlobalChild, addLocalChild, asStep, getSelfAndChildRequirements, integrateChild, removeGlobalChild, removeLocalChild
forEachRemaining, remove
public RepeatStep(Traversal.Admin traversal)
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,S>
public void setRepeatTraversal(Traversal.Admin<S,S> repeatTraversal)
public void setUntilTraversal(Traversal.Admin<S,?> untilTraversal)
public void setEmitTraversal(Traversal.Admin<S,?> emitTraversal)
public List<Traversal.Admin<S,S>> getGlobalChildren()
getGlobalChildren
in interface TraversalParent
public List<Traversal.Admin<S,?>> getLocalChildren()
getLocalChildren
in interface TraversalParent
public final boolean doUntil(Traverser.Admin<S> traverser, boolean utilFirst)
public final boolean doEmit(Traverser.Admin<S> traverser, boolean emitFirst)
public String toString()
toString
in class AbstractStep<S,S>
public RepeatStep<S> clone()
Step
EmptyStep
.public int hashCode()
hashCode
in class AbstractStep<S,S>
protected Iterator<Traverser<S>> standardAlgorithm() throws NoSuchElementException
standardAlgorithm
in class ComputerAwareStep<S,S>
NoSuchElementException
protected Iterator<Traverser<S>> computerAlgorithm() throws NoSuchElementException
computerAlgorithm
in class ComputerAwareStep<S,S>
NoSuchElementException
public static <A,B,C extends Traversal<A,B>> C addRepeatToTraversal(C traversal, Traversal.Admin<B,B> repeatTraversal)
public static <A,B,C extends Traversal<A,B>> C addUntilToTraversal(C traversal, Traversal.Admin<B,?> untilPredicate)
public static <A,B,C extends Traversal<A,B>> C addEmitToTraversal(C traversal, Traversal.Admin<B,?> emitPredicate)
Copyright © 2013–2015 Apache Software Foundation. All rights reserved.