Class AbstractStep<S,E>
- java.lang.Object
- 
- org.apache.tinkerpop.gremlin.process.traversal.step.util.AbstractStep<S,E>
 
- 
- All Implemented Interfaces:
- Serializable,- Cloneable,- Iterator<Traverser.Admin<E>>,- Step<S,E>
 - Direct Known Subclasses:
- AddEdgeStartStep,- AddVertexStartStep,- AggregateGlobalStep,- CallStep,- CollectingBarrierStep,- ComputerAwareStep,- ComputerAwareStep.EndStep,- ComputerResultStep,- FilterStep,- FlatMapStep,- GraphStep,- HasNextStep,- IdentityStep,- IoStep,- LocalStep,- MapStep,- MatchStep.MatchStartStep,- NoOpBarrierStep,- OptionalStep,- ProfileStep,- ReducingBarrierStep,- RemoteStep,- RequirementsStep,- SackValueStep,- SideEffectStep,- StartStep,- SupplyingBarrierStep,- TailGlobalStep,- TinkerCountGlobalStep,- VertexProgramStep
 
 public abstract class AbstractStep<S,E> extends Object implements Step<S,E> - Author:
- Marko A. Rodriguez (http://markorodriguez.com)
- See Also:
- Serialized Form
 
- 
- 
Field SummaryFields Modifier and Type Field Description protected Stringidprotected Set<String>labelsprotected Traverser.Admin<E>nextEndprotected Step<E,?>nextStepprotected Step<?,S>previousStepprotected ExpandableStepIterator<S>startsprotected Traversal.Admintraversalprotected booleantraverserStepIdAndLabelsSetByChild
 - 
Constructor SummaryConstructors Constructor Description AbstractStep(Traversal.Admin traversal)
 - 
Method SummaryAll Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidaddLabel(String label)Add a label to this step.voidaddStart(Traverser.Admin<S> start)Add a singleTraverser.Adminto the step.voidaddStarts(Iterator<Traverser.Admin<S>> starts)Add an iterator ofTraverser.Adminobjects 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.booleanequals(Object other)StringgetId()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.ExpandableStepIterator<S>getStarts()<A,B>
 Traversal.Admin<A,B>getTraversal()Get theTraversal.Adminthat this step is contained within.inthashCode()booleanhasNext()booleanhasStarts()Determines if starts objects are present without iterating forward.booleanisTraverserStepIdAndLabelsSetByChild()Traverser.Admin<E>next()protected Traverser.Admin<E>prepareTraversalForNextStep(Traverser.Admin<E> traverser)protected abstract Traverser.Admin<E>processNextStart()voidremoveLabel(String label)Remove a label from this step.voidreset()Reset the state of the step such that it has no incoming starts.voidsetId(String id)Get the unique id of the step.voidsetNextStep(Step<E,?> step)Set the step that is next to the current step.voidsetPreviousStep(Step<?,S> step)Set the step that is previous to the current step.voidsetTraversal(Traversal.Admin<?,?> traversal)Set theTraversalthat this step is contained within.StringtoString()- 
Methods inherited from class java.lang.Objectfinalize, getClass, notify, notifyAll, wait, wait, wait
 - 
Methods inherited from interface java.util.IteratorforEachRemaining, remove
 - 
Methods inherited from interface org.apache.tinkerpop.gremlin.process.traversal.Stepequals, getRequirements
 
- 
 
- 
- 
- 
Field Detail- 
idprotected String id 
 - 
traversalprotected Traversal.Admin traversal 
 - 
startsprotected ExpandableStepIterator<S> starts 
 - 
nextEndprotected Traverser.Admin<E> nextEnd 
 - 
traverserStepIdAndLabelsSetByChildprotected boolean traverserStepIdAndLabelsSetByChild 
 
- 
 - 
Constructor Detail- 
AbstractSteppublic AbstractStep(Traversal.Admin traversal) 
 
- 
 - 
Method Detail- 
setIdpublic void setId(String id) Description copied from interface:StepGet the unique id of the step. These ids can change when strategies are applied and anonymous traversals are embedded in the parent traversal. A developer should typically not need to call this method.
 - 
addLabelpublic void addLabel(String label) Description copied from interface:StepAdd a label to this step.
 - 
removeLabelpublic void removeLabel(String label) Description copied from interface:StepRemove a label from this step.- Specified by:
- removeLabelin interface- Step<S,E>
- Parameters:
- label- the label to remove from this step
 
 - 
getLabelspublic Set<String> getLabels() Description copied from interface:StepGet the labels of this step. The labels are ordered by the order of the calls toStep.addLabel(java.lang.String).
 - 
resetpublic 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.
 - 
addStartspublic void addStarts(Iterator<Traverser.Admin<S>> starts) Description copied from interface:StepAdd an iterator ofTraverser.Adminobjects of type S to the step.
 - 
addStartpublic void addStart(Traverser.Admin<S> start) Description copied from interface:StepAdd a singleTraverser.Adminto the step.
 - 
hasStartspublic boolean hasStarts() Description copied from interface:StepDetermines if starts objects are present without iterating forward. This function has special applicability aroundReducingBarrierStepimplementations where they always returntruefor calls toIterator.hasNext(). Using this function gives insight to what the step itself is holding in its iterator without performing any sort of processing on the step itself.
 - 
setPreviousSteppublic void setPreviousStep(Step<?,S> step) Description copied from interface:StepSet the step that is previous to the current step. Used for linking steps together to form a function chain.- Specified by:
- setPreviousStepin interface- Step<S,E>
- Parameters:
- step- the previous step of this step
 
 - 
getPreviousSteppublic Step<?,S> getPreviousStep() Description copied from interface:StepGet the step prior to the current step.- Specified by:
- getPreviousStepin interface- Step<S,E>
- Returns:
- The previous step
 
 - 
setNextSteppublic void setNextStep(Step<E,?> step) Description copied from interface:StepSet the step that is next to the current step. Used for linking steps together to form a function chain.- Specified by:
- setNextStepin interface- Step<S,E>
- Parameters:
- step- the next step of this step
 
 - 
getNextSteppublic Step<E,?> getNextStep() Description copied from interface:StepGet the next step to the current step.- Specified by:
- getNextStepin interface- Step<S,E>
- Returns:
- The next step
 
 - 
nextpublic Traverser.Admin<E> next() 
 - 
getTraversalpublic <A,B> Traversal.Admin<A,B> getTraversal() Description copied from interface:StepGet theTraversal.Adminthat this step is contained within.- Specified by:
- getTraversalin interface- Step<S,E>
- Type Parameters:
- A- The incoming object type of the traversal
- B- The outgoing object type of the traversal
- Returns:
- The traversal of this step
 
 - 
setTraversalpublic void setTraversal(Traversal.Admin<?,?> traversal) Description copied from interface:StepSet theTraversalthat this step is contained within.- Specified by:
- setTraversalin interface- Step<S,E>
- Parameters:
- traversal- the new traversal for this step
 
 - 
processNextStartprotected abstract Traverser.Admin<E> processNextStart() throws NoSuchElementException - Throws:
- NoSuchElementException
 
 - 
clonepublic AbstractStep<S,E> 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.
 - 
getStartspublic ExpandableStepIterator<S> getStarts() 
 - 
isTraverserStepIdAndLabelsSetByChildpublic boolean isTraverserStepIdAndLabelsSetByChild() 
 - 
prepareTraversalForNextStepprotected Traverser.Admin<E> prepareTraversalForNextStep(Traverser.Admin<E> traverser) 
 
- 
 
-