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:
  • Constructor Details

  • Method Details

    • 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 interface Traverser.Admin<T>
      Overrides:
      split in class EmptyTraverser<T>
      Type Parameters:
      R - The current object type of the child
      Parameters:
      r - The current object of the child
      step - 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 the Traversal. 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 interface Traverser.Admin<T>
      Overrides:
      setSideEffects in class EmptyTraverser<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 interface Traverser.Admin<T>
      Overrides:
      getSideEffects in class EmptyTraverser<T>
      Returns:
      the traversal sideEffects of the traverser
    • equals

      public boolean equals(Object object)
      Overrides:
      equals in class EmptyTraverser<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.
      Specified by:
      clone in interface Traverser<T>
      Overrides:
      clone in class EmptyTraverser<T>