public final class RepeatStep<S> extends ComputerAwareStep<S,S> implements TraversalParent
Modifier and Type | Class and Description |
---|---|
static class |
RepeatStep.RepeatEndStep<S> |
ComputerAwareStep.EndStep<S>
Modifier and Type | Field and Description |
---|---|
boolean |
emitFirst |
boolean |
untilFirst |
id, labels, nextEnd, nextStep, previousStep, starts, traversal, traverserStepIdAndLabelsSetByChild
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,
String loopName,
Traversal.Admin<B,B> repeatTraversal) |
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.Admin<S>> |
computerAlgorithm() |
boolean |
doEmit(Traverser.Admin<S> traverser,
boolean emitFirst) |
boolean |
doUntil(Traverser.Admin<S> traverser,
boolean utilFirst) |
Traversal.Admin<S,?> |
getEmitTraversal() |
List<Traversal.Admin<S,S>> |
getGlobalChildren() |
List<Traversal.Admin<S,?>> |
getLocalChildren() |
Traversal.Admin<S,S> |
getRepeatTraversal() |
Set<TraverserRequirement> |
getRequirements()
Provide the necessary
TraverserRequirement that must be met by the traverser in order for the step to function properly. |
Traversal.Admin<S,?> |
getUntilTraversal() |
int |
hashCode() |
void |
reset()
Reset the state of the step such that it has no incoming starts.
|
void |
setEmitTraversal(Traversal.Admin<S,?> emitTraversal) |
void |
setLoopName(String loopName) |
void |
setRepeatTraversal(Traversal.Admin<S,S> repeatTraversal) |
void |
setTraversal(Traversal.Admin<?,?> parentTraversal)
Set the
Traversal that this step is contained within. |
void |
setUntilTraversal(Traversal.Admin<S,?> untilTraversal) |
protected Iterator<Traverser.Admin<S>> |
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, close, getSelfAndChildRequirements, integrateChild, removeGlobalChild, removeLocalChild
atMaster, atMaster
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 setLoopName(String loopName)
public void setUntilTraversal(Traversal.Admin<S,?> untilTraversal)
public Traversal.Admin<S,?> getUntilTraversal()
public void setEmitTraversal(Traversal.Admin<S,?> emitTraversal)
public Traversal.Admin<S,?> getEmitTraversal()
public Traversal.Admin<S,S> getRepeatTraversal()
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 void reset()
Step
public RepeatStep<S> clone()
Step
EmptyStep
.public void setTraversal(Traversal.Admin<?,?> parentTraversal)
Step
Traversal
that this step is contained within.setTraversal
in interface Step<S,S>
setTraversal
in class AbstractStep<S,S>
parentTraversal
- the new traversal for this steppublic int hashCode()
hashCode
in class AbstractStep<S,S>
protected Iterator<Traverser.Admin<S>> standardAlgorithm() throws NoSuchElementException
standardAlgorithm
in class ComputerAwareStep<S,S>
NoSuchElementException
protected Iterator<Traverser.Admin<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 addRepeatToTraversal(C traversal, String loopName, 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–2018 Apache Software Foundation. All rights reserved.