public abstract class AbstractStep<S,E> extends java.lang.Object implements Step<S,E>
| Modifier and Type | Field and Description |
|---|---|
protected java.lang.String |
id |
protected java.util.Optional<java.lang.String> |
label |
protected Traverser<E> |
nextEnd |
protected Step<E,?> |
nextStep |
protected Step<?,S> |
previousStep |
protected static boolean |
PROFILING_ENABLED |
protected ExpandableStepIterator<S> |
starts |
protected Traversal |
traversal |
protected boolean |
traverserStepIdSetByChild |
| Constructor and Description |
|---|
AbstractStep(Traversal traversal) |
| Modifier and Type | Method and Description |
|---|---|
void |
addStart(Traverser<S> start)
Add a single
Traverser to the step. |
void |
addStarts(java.util.Iterator<Traverser<S>> starts)
Add a iterator of
Traverser objects of type S to the step. |
AbstractStep<S,E> |
clone()
Cloning is used to duplicate steps for the purpose of traversal optimization and OLTP replication.
|
java.lang.String |
getId()
Get the unique id of this step.
|
java.util.Optional<java.lang.String> |
getLabel()
Get the label of this step.
|
Step<E,?> |
getNextStep()
Get the next step to the current step.
|
Step<?,S> |
getPreviousStep()
Get the step prior to the current step.
|
<A,B> Traversal<A,B> |
getTraversal()
Get the
Traversal that this step is contained within. |
boolean |
hasNext() |
Traverser<E> |
next() |
protected abstract Traverser<E> |
processNextStart() |
void |
reset()
Reset the state of the step such that it has no incoming starts.
|
void |
setId(java.lang.String id)
Get the unique id of the step.
|
void |
setLabel(java.lang.String label)
Set the label of this step.
|
void |
setNextStep(Step<E,?> step)
Set the step that is next to the current step.
|
void |
setPreviousStep(Step<?,S> step)
Set the step that is previous to the current step.
|
void |
setTraversal(Traversal<?,?> traversal)
Set the
Traversal that this step is contained within. |
java.lang.String |
toString() |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetRequirementsprotected java.util.Optional<java.lang.String> label
protected java.lang.String id
protected Traversal traversal
protected ExpandableStepIterator<S> starts
protected boolean traverserStepIdSetByChild
protected static final boolean PROFILING_ENABLED
public AbstractStep(Traversal traversal)
public void setId(java.lang.String id)
Steppublic java.lang.String getId()
Steppublic void setLabel(java.lang.String label)
Steppublic java.util.Optional<java.lang.String> getLabel()
StepOptional.empty() is returned.public void reset()
Steppublic void addStarts(java.util.Iterator<Traverser<S>> starts)
StepTraverser objects of type S to the step.public void addStart(Traverser<S> start)
StepTraverser to the step.public void setPreviousStep(Step<?,S> step)
StepsetPreviousStep in interface Step<S,E>step - the previous step of this steppublic Step<?,S> getPreviousStep()
StepgetPreviousStep in interface Step<S,E>public void setNextStep(Step<E,?> step)
StepsetNextStep in interface Step<S,E>step - the next step of this steppublic Step<E,?> getNextStep()
StepgetNextStep in interface Step<S,E>public boolean hasNext()
public <A,B> Traversal<A,B> getTraversal()
StepTraversal that this step is contained within.getTraversal in interface Step<S,E>A - The incoming object type of the traversalB - The outgoing object type of the traversalpublic void setTraversal(Traversal<?,?> traversal)
StepTraversal that this step is contained within.setTraversal in interface Step<S,E>traversal - the new traversal for this stepprotected abstract Traverser<E> processNextStart() throws java.util.NoSuchElementException
java.util.NoSuchElementExceptionpublic java.lang.String toString()
toString in class java.lang.Objectpublic AbstractStep<S,E> clone() throws java.lang.CloneNotSupportedException
StepEmptyStep.Copyright © 2013-2015 TinkerPop. All Rights Reserved.