Class B_O_S_SE_SL_Traverser<T>
- java.lang.Object
-
- org.apache.tinkerpop.gremlin.process.traversal.traverser.util.AbstractTraverser<T>
-
- org.apache.tinkerpop.gremlin.process.traversal.traverser.O_Traverser<T>
-
- org.apache.tinkerpop.gremlin.process.traversal.traverser.B_O_Traverser<T>
-
- org.apache.tinkerpop.gremlin.process.traversal.traverser.B_O_S_SE_SL_Traverser<T>
-
- All Implemented Interfaces:
Serializable,Cloneable,Comparable<Traverser<T>>,Traverser<T>,Traverser.Admin<T>,NL_SL_Traverser<T>,Attachable<T>
- Direct Known Subclasses:
B_LP_O_P_S_SE_SL_Traverser,B_LP_O_S_SE_SL_Traverser,B_NL_O_S_SE_SL_Traverser
public class B_O_S_SE_SL_Traverser<T> extends B_O_Traverser<T> implements NL_SL_Traverser<T>
- Author:
- Marko A. Rodriguez (http://markorodriguez.com)
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.tinkerpop.gremlin.structure.util.Attachable
Attachable.Exceptions, Attachable.Method
-
Nested classes/interfaces inherited from interface org.apache.tinkerpop.gremlin.process.traversal.Traverser
Traverser.Admin<T>
-
-
Field Summary
Fields Modifier and Type Field Description protected StringloopNameprotected shortloopsprotected Objectsackprotected TraversalSideEffectssideEffectsprotected StringstepLabel-
Fields inherited from class org.apache.tinkerpop.gremlin.process.traversal.traverser.B_O_Traverser
bulk, future
-
Fields inherited from class org.apache.tinkerpop.gremlin.process.traversal.traverser.O_Traverser
tags
-
Fields inherited from class org.apache.tinkerpop.gremlin.process.traversal.traverser.util.AbstractTraverser
t
-
Fields inherited from interface org.apache.tinkerpop.gremlin.structure.util.Attachable
logger
-
Fields inherited from interface org.apache.tinkerpop.gremlin.process.traversal.Traverser.Admin
HALT
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedB_O_S_SE_SL_Traverser()B_O_S_SE_SL_Traverser(T t, Step<T,?> step, long initialBulk)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object object)protected booleanequals(B_O_S_SE_SL_Traverser other)TraverserRequirementgetLoopRequirement()TraversalSideEffectsgetSideEffects()Get the sideEffects associated with the traversal of the traverser.shortgetSingleLoopCount()Override this method to support single loop.StringgetSingleLoopName()Override this method to support single loop.StringgetSingleLoopStepLabel()Override this method to support single loop.inthashCode()voidmerge(Traverser.Admin<?> other)When two traversers are have equality with each other, then they can be merged.<S> Ssack()Get the sack local sack object of this traverser.<S> voidsack(S object)Set the traversers sack object to the provided value ("sack the value").voidsetSideEffects(TraversalSideEffects sideEffects)Set the sideEffects of theTraversal.voidsetSingleLoopCount(short loops)Override this method to support single loop.voidsetSingleLoopName(String loopName)Override this method to support single loop.voidsetSingleLoopStepLabel(String stepLabel)Override this method to support single loop.Traverser.Admin<T>split()Generate a sibling traverser of the current traverser with a full copy of all state within the sibling.<R> Traverser.Admin<R>split(R r, Step<T,R> step)Generate a child traverser of the current traverser for current as step and new object location.-
Methods inherited from class org.apache.tinkerpop.gremlin.process.traversal.traverser.B_O_Traverser
bulk, equals, getStepId, setBulk, setStepId
-
Methods inherited from class org.apache.tinkerpop.gremlin.process.traversal.traverser.O_Traverser
equals, getTags
-
Methods inherited from class org.apache.tinkerpop.gremlin.process.traversal.traverser.util.AbstractTraverser
addLabels, attach, clone, detach, dropLabels, dropPath, get, keepLabels, path, set, toString
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.tinkerpop.gremlin.structure.util.Attachable
get
-
Methods inherited from interface org.apache.tinkerpop.gremlin.process.traversal.traverser.NL_SL_Traverser
copyNestedLoops, getLoopNames, getNestedLoopCount, getNestedLoopNames, getNestedLoops, getValidLoopRequirement, incrLoops, initialiseLoops, initialiseNestedLoops, loops, loops, resetLoops
-
Methods inherited from interface org.apache.tinkerpop.gremlin.process.traversal.Traverser
asAdmin, bulk, clone, compareTo, get, path, path, path, sideEffects, sideEffects
-
Methods inherited from interface org.apache.tinkerpop.gremlin.process.traversal.Traverser.Admin
addLabels, attach, detach, dropLabels, dropPath, getStepId, getTags, isHalted, keepLabels, set, setBulk, setStepId
-
-
-
-
Field Detail
-
sack
protected Object sack
-
loops
protected short loops
-
loopName
protected String loopName
-
stepLabel
protected String stepLabel
-
sideEffects
protected transient TraversalSideEffects sideEffects
-
-
Method Detail
-
getSingleLoopCount
public short getSingleLoopCount()
Description copied from interface:NL_SL_TraverserOverride this method to support single loop.- Specified by:
getSingleLoopCountin interfaceNL_SL_Traverser<T>- Returns:
- the single loop count.
-
setSingleLoopCount
public void setSingleLoopCount(short loops)
Description copied from interface:NL_SL_TraverserOverride this method to support single loop. Sets the single loop count.- Specified by:
setSingleLoopCountin interfaceNL_SL_Traverser<T>
-
getSingleLoopName
public String getSingleLoopName()
Description copied from interface:NL_SL_TraverserOverride this method to support single loop.- Specified by:
getSingleLoopNamein interfaceNL_SL_Traverser<T>- Returns:
- the single loop name.
-
setSingleLoopName
public void setSingleLoopName(String loopName)
Description copied from interface:NL_SL_TraverserOverride this method to support single loop. Sets the single loop name.- Specified by:
setSingleLoopNamein interfaceNL_SL_Traverser<T>
-
getSingleLoopStepLabel
public String getSingleLoopStepLabel()
Description copied from interface:NL_SL_TraverserOverride this method to support single loop.- Specified by:
getSingleLoopStepLabelin interfaceNL_SL_Traverser<T>- Returns:
- the single loop step label.
-
setSingleLoopStepLabel
public void setSingleLoopStepLabel(String stepLabel)
Description copied from interface:NL_SL_TraverserOverride this method to support single loop. Sets the single loop step label.- Specified by:
setSingleLoopStepLabelin interfaceNL_SL_Traverser<T>
-
getLoopRequirement
public TraverserRequirement getLoopRequirement()
- Specified by:
getLoopRequirementin interfaceNL_SL_Traverser<T>- Returns:
- the supported loop type - either
TraverserRequirement.NESTED_LOOPorTraverserRequirement.SINGLE_LOOP
-
sack
public <S> S sack()
Description copied from interface:TraverserGet the sack local sack object of this traverser.
-
sack
public <S> void sack(S object)
Description copied from interface:TraverserSet the traversers sack object to the provided value ("sack the value").
-
getSideEffects
public TraversalSideEffects getSideEffects()
Description copied from interface:Traverser.AdminGet the sideEffects associated with the traversal of the traverser.- Specified by:
getSideEffectsin interfaceTraverser.Admin<T>- Overrides:
getSideEffectsin classAbstractTraverser<T>- Returns:
- the traversal sideEffects of the traverser
-
setSideEffects
public void setSideEffects(TraversalSideEffects sideEffects)
Description copied from interface:Traverser.AdminSet the sideEffects of theTraversal. Given that traversers can move between machines, it may be important to re-set this when the traverser crosses machine boundaries.- Specified by:
setSideEffectsin interfaceTraverser.Admin<T>- Overrides:
setSideEffectsin classAbstractTraverser<T>- Parameters:
sideEffects- the sideEffects of the traversal.
-
split
public <R> Traverser.Admin<R> split(R r, Step<T,R> step)
Description copied from interface:Traverser.AdminGenerate a child traverser of the current traverser for current as step and new object location. The child has the path history, future, and loop information of the parent. The child extends that path history with the current as and provided R-object.- Specified by:
splitin interfaceTraverser.Admin<T>- Overrides:
splitin classO_Traverser<T>- Type Parameters:
R- The current object type of the child- Parameters:
r- The current object of the childstep- The step yielding the split- Returns:
- The split traverser
-
split
public Traverser.Admin<T> split()
Description copied from interface:Traverser.AdminGenerate a sibling traverser of the current traverser with a full copy of all state within the sibling.- Specified by:
splitin interfaceTraverser.Admin<T>- Overrides:
splitin classO_Traverser<T>- Returns:
- The split traverser
-
merge
public void merge(Traverser.Admin<?> other)
Description copied from interface:Traverser.AdminWhen two traversers are have equality with each other, then they can be merged. This method is used to merge the traversers into a single traverser. This is used for optimization where instead of enumerating all traversers, they can be counted.- Specified by:
mergein interfaceTraverser.Admin<T>- Overrides:
mergein classB_O_Traverser<T>- Parameters:
other- the other traverser to merge into this traverser. Once merged, the other can be garbage collected.
-
hashCode
public int hashCode()
- Overrides:
hashCodein classB_O_Traverser<T>
-
equals
protected final boolean equals(B_O_S_SE_SL_Traverser other)
-
equals
public boolean equals(Object object)
- Overrides:
equalsin classB_O_Traverser<T>
-
-