Class DummyTraverser<T>
- java.lang.Object
-
- org.apache.tinkerpop.gremlin.process.traversal.traverser.util.EmptyTraverser<T>
-
- org.apache.tinkerpop.gremlin.process.traversal.traverser.util.DummyTraverser<T>
-
- All Implemented Interfaces:
Serializable
,Cloneable
,Comparable<Traverser<T>>
,Traverser<T>
,Traverser.Admin<T>
,Attachable<T>
public final class DummyTraverser<T> extends EmptyTraverser<T>
Similar to the EmptyTraverser, except the DummyTraverser can split. When it splits it generates an entirely new traverser using its supplied TraverserGenerator, leaving no trace of the initial DummyTraverser in the path. Useful for seeding nested traversals inside of start steps.- Author:
- Mike Personick (http://github.com/mikepersonick)
- 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 inherited from interface org.apache.tinkerpop.gremlin.process.traversal.Traverser.Admin
HALT
-
-
Constructor Summary
Constructors Constructor Description DummyTraverser(TraverserGenerator generator)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DummyTraverser<T>
clone()
Traverser cloning is important when splitting a traverser at a bifurcation point in a traversal.boolean
equals(Object object)
TraversalSideEffects
getSideEffects()
Get the sideEffects associated with the traversal of the traverser.void
setSideEffects(TraversalSideEffects sideEffects)
Set the sideEffects of theTraversal
.<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.util.EmptyTraverser
addLabels, attach, bulk, detach, dropLabels, dropPath, get, getStepId, getTags, hashCode, incrLoops, initialiseLoops, instance, keepLabels, loops, loops, merge, path, resetLoops, sack, sack, set, setBulk, setStepId, split
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, 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
getLoopNames, isHalted
-
-
-
-
Constructor Detail
-
DummyTraverser
public DummyTraverser(TraverserGenerator generator)
-
-
Method Detail
-
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 classEmptyTraverser<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
-
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 classEmptyTraverser<T>
- Parameters:
sideEffects
- the sideEffects of the traversal.
-
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 classEmptyTraverser<T>
- Returns:
- the traversal sideEffects of the traverser
-
equals
public boolean equals(Object object)
- Overrides:
equals
in classEmptyTraverser<T>
-
clone
public DummyTraverser<T> clone()
Description copied from interface:Traverser
Traverser cloning is important when splitting a traverser at a bifurcation point in a traversal.
-
-