java.lang.Object
org.apache.tinkerpop.gremlin.process.traversal.traverser.util.AbstractTraverser<T>
org.apache.tinkerpop.gremlin.process.traversal.traverser.O_Traverser<T>
All Implemented Interfaces:
Serializable, Cloneable, Comparable<Traverser<T>>, Traverser<T>, Traverser.Admin<T>, Attachable<T>
Direct Known Subclasses:
B_O_Traverser, O_OB_S_SE_SL_Traverser

public abstract class O_Traverser<T> extends AbstractTraverser<T>
Author:
Marko A. Rodriguez (http://markorodriguez.com)
See Also:
  • Field Details

  • Constructor Details

    • O_Traverser

      protected O_Traverser()
    • O_Traverser

      public O_Traverser(T t)
  • Method Details

    • getTags

      public Set<String> getTags()
      Description copied from interface: Traverser.Admin
      Get the tags associated with the traverser. Tags are used to categorize historic behavior of a traverser. The returned set is mutable.
      Returns:
      the set of tags associated with the traverser.
    • 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 AbstractTraverser<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
    • 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 interface Traverser.Admin<T>
      Overrides:
      split in class AbstractTraverser<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 interface Traverser.Admin<T>
      Overrides:
      merge in class AbstractTraverser<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 class AbstractTraverser<T>
    • equals

      protected final boolean equals(O_Traverser other)
    • equals

      public boolean equals(Object object)
      Overrides:
      equals in class AbstractTraverser<T>