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>
,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>
- 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 String
loopName
protected short
loops
protected Object
sack
protected TraversalSideEffects
sideEffects
-
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 protected
B_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 boolean
equals(Object object)
protected boolean
equals(B_O_S_SE_SL_Traverser other)
Set<String>
getLoopNames()
If this traverser supports loops then return the loop names if any.TraversalSideEffects
getSideEffects()
Get the sideEffects associated with the traversal of the traverser.int
hashCode()
void
incrLoops()
Increment the number of times the traverser has gone through a looping section of traversal.void
initialiseLoops(String stepLabel, String loopName)
Initialise a loop by setting up the looping construct.int
loops()
Return the number of times the traverser has gone through a looping section of a traversal.int
loops(String loopName)
Return the number of times the traverser has gone through the named looping section of a traversal.void
merge(Traverser.Admin<?> other)
When two traversers are have equality with each other, then they can be merged.void
resetLoops()
Set the number of times the traverser has gone through a loop back to 0.<S> S
sack()
Get the sack local sack object of this traverser.<S> void
sack(S object)
Set the traversers sack object to the provided value ("sack the value").void
setSideEffects(TraversalSideEffects sideEffects)
Set the sideEffects of theTraversal
.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.process.traversal.Traverser
asAdmin, compareTo, path, path, sideEffects, sideEffects
-
Methods inherited from interface org.apache.tinkerpop.gremlin.process.traversal.Traverser.Admin
isHalted
-
-
-
-
Field Detail
-
sack
protected Object sack
-
loops
protected short loops
-
loopName
protected String loopName
-
sideEffects
protected transient TraversalSideEffects sideEffects
-
-
Method Detail
-
sack
public <S> S sack()
Description copied from interface:Traverser
Get the sack local sack object of this traverser.
-
sack
public <S> void sack(S object)
Description copied from interface:Traverser
Set the traversers sack object to the provided value ("sack the value").
-
loops
public int loops()
Description copied from interface:Traverser
Return the number of times the traverser has gone through a looping section of a traversal.
-
loops
public int loops(String loopName)
Description copied from interface:Traverser
Return the number of times the traverser has gone through the named looping section of a traversal.
-
getLoopNames
public Set<String> getLoopNames()
Description copied from interface:Traverser.Admin
If this traverser supports loops then return the loop names if any.
-
initialiseLoops
public void initialiseLoops(String stepLabel, String loopName)
Description copied from interface:Traverser.Admin
Initialise a loop by setting up the looping construct. The step label is important to create a stack of loop counters when within a nested context. If the provided label is not the same as the current label on the stack, add a new loop counter. The loopName can be used to refer to the loops counter via theLoopsStep
- Specified by:
initialiseLoops
in interfaceTraverser.Admin<T>
- Overrides:
initialiseLoops
in classAbstractTraverser<T>
- Parameters:
stepLabel
- the label of the step that is being set-up.loopName
- the user defined name for referencing the loop counter or null if not set
-
incrLoops
public void incrLoops()
Description copied from interface:Traverser.Admin
Increment the number of times the traverser has gone through a looping section of traversal.- Specified by:
incrLoops
in interfaceTraverser.Admin<T>
- Overrides:
incrLoops
in classAbstractTraverser<T>
-
resetLoops
public void resetLoops()
Description copied from interface:Traverser.Admin
Set the number of times the traverser has gone through a loop back to 0. When a traverser exits a looping construct, this method should be called. In a nested loop context, the highest stack loop counter should be removed.- Specified by:
resetLoops
in interfaceTraverser.Admin<T>
- Overrides:
resetLoops
in classAbstractTraverser<T>
-
getSideEffects
public TraversalSideEffects getSideEffects()
Description copied from interface:Traverser.Admin
Get the sideEffects associated with the traversal of the traverser.- Specified by:
getSideEffects
in interfaceTraverser.Admin<T>
- Overrides:
getSideEffects
in classAbstractTraverser<T>
- Returns:
- the traversal sideEffects of the traverser
-
setSideEffects
public void setSideEffects(TraversalSideEffects sideEffects)
Description copied from interface:Traverser.Admin
Set 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:
setSideEffects
in interfaceTraverser.Admin<T>
- Overrides:
setSideEffects
in 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.Admin
Generate 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:
split
in interfaceTraverser.Admin<T>
- Overrides:
split
in 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.Admin
Generate a sibling traverser of the current traverser with a full copy of all state within the sibling.- Specified by:
split
in interfaceTraverser.Admin<T>
- Overrides:
split
in classO_Traverser<T>
- Returns:
- The split traverser
-
merge
public void merge(Traverser.Admin<?> other)
Description copied from interface:Traverser.Admin
When 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:
merge
in interfaceTraverser.Admin<T>
- Overrides:
merge
in 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:
hashCode
in classB_O_Traverser<T>
-
equals
protected final boolean equals(B_O_S_SE_SL_Traverser other)
-
equals
public boolean equals(Object object)
- Overrides:
equals
in classB_O_Traverser<T>
-
-