public abstract class AbstractStep<S,E> extends Object implements Step<S,E>
Modifier and Type | Field and Description |
---|---|
protected String |
id |
protected Set<String> |
labels |
protected Traverser.Admin<E> |
nextEnd |
protected Step<E,?> |
nextStep |
protected Step<?,S> |
previousStep |
protected ExpandableStepIterator<S> |
starts |
protected Traversal.Admin |
traversal |
protected boolean |
traverserStepIdAndLabelsSetByChild |
Constructor and Description |
---|
AbstractStep(Traversal.Admin traversal) |
Modifier and Type | Method and Description |
---|---|
void |
addLabel(String label)
Add a label to this step.
|
void |
addStart(Traverser.Admin<S> start)
Add a single
Traverser.Admin to the step. |
void |
addStarts(Iterator<Traverser.Admin<S>> starts)
Add a iterator of
Traverser.Admin 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.
|
boolean |
equals(Object other) |
String |
getId()
Get the unique id of this step.
|
Set<String> |
getLabels()
Get the labels 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.Admin<A,B> |
getTraversal()
Get the
Traversal.Admin that this step is contained within. |
int |
hashCode() |
boolean |
hasNext() |
Traverser.Admin<E> |
next() |
protected abstract Traverser.Admin<E> |
processNextStart() |
void |
removeLabel(String label)
Remove a label from this step.
|
void |
reset()
Reset the state of the step such that it has no incoming starts.
|
void |
setId(String id)
Get the unique id of the 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.Admin<?,?> traversal)
Set the
Traversal that this step is contained within. |
String |
toString() |
finalize, getClass, notify, notifyAll, wait, wait, wait
equals, getRequirements
forEachRemaining, remove
protected String id
protected Traversal.Admin traversal
protected ExpandableStepIterator<S> starts
protected Traverser.Admin<E> nextEnd
protected boolean traverserStepIdAndLabelsSetByChild
public AbstractStep(Traversal.Admin traversal)
public void setId(String id)
Step
public void addLabel(String label)
Step
public void removeLabel(String label)
Step
removeLabel
in interface Step<S,E>
label
- the label to remove from this steppublic Set<String> getLabels()
Step
Step.addLabel(java.lang.String)
.public void reset()
Step
public void addStarts(Iterator<Traverser.Admin<S>> starts)
Step
Traverser.Admin
objects of type S to the step.public void addStart(Traverser.Admin<S> start)
Step
Traverser.Admin
to the step.public void setPreviousStep(Step<?,S> step)
Step
setPreviousStep
in interface Step<S,E>
step
- the previous step of this steppublic Step<?,S> getPreviousStep()
Step
getPreviousStep
in interface Step<S,E>
public void setNextStep(Step<E,?> step)
Step
setNextStep
in interface Step<S,E>
step
- the next step of this steppublic Step<E,?> getNextStep()
Step
getNextStep
in interface Step<S,E>
public Traverser.Admin<E> next()
next
in interface Iterator<Traverser.Admin<E>>
public boolean hasNext()
hasNext
in interface Iterator<Traverser.Admin<E>>
public <A,B> Traversal.Admin<A,B> getTraversal()
Step
Traversal.Admin
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.Admin<?,?> traversal)
Step
Traversal
that this step is contained within.setTraversal
in interface Step<S,E>
traversal
- the new traversal for this stepprotected abstract Traverser.Admin<E> processNextStart() throws NoSuchElementException
NoSuchElementException
public AbstractStep<S,E> clone()
Step
EmptyStep
.Copyright © 2013–2018 Apache Software Foundation. All rights reserved.