org.apache.tinkerpop.gremlin.process.traversal.traverser

## Class LP_NL_O_OB_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.O_OB_S_SE_SL_Traverser<T>
      - - org.apache.tinkerpop.gremlin.process.traversal.traverser.LP_O_OB_S_SE_SL_Traverser<T>
        - - org.apache.tinkerpop.gremlin.process.traversal.traverser.LP_NL_O_OB_S_SE_SL_Traverser<T>

- All Implemented Interfaces:
    Serializable, Cloneable, Comparable<Traverser<T>>, Traverser<T>, Traverser.Admin<T>, Attachable<T>

      public class LP_NL_O_OB_S_SE_SL_Traverser<T>
      extends LP_O_OB_S_SE_SL_Traverser<T>

  See Also:
    Serialized Form

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface org.apache.tinkerpop.gremlin.process.traversal.Traverser

      `Traverser.Admin<T>`

    - ### Nested classes/interfaces inherited from interface org.apache.tinkerpop.gremlin.structure.util.Attachable

      `Attachable.Exceptions, Attachable.Method`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected ReferenceMap` | `loopNames`
    `protected Stack<LabelledCounter>` | `nestedLoops`

    - ### Fields inherited from class org.apache.tinkerpop.gremlin.process.traversal.traverser.LP_O_OB_S_SE_SL_Traverser

      `path`

    - ### Fields inherited from class org.apache.tinkerpop.gremlin.process.traversal.traverser.O_OB_S_SE_SL_Traverser

      `bulk, future, loopName, loops, sack, sideEffects`

    - ### 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.process.traversal.Traverser.Admin

      `HALT`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `LP_NL_O_OB_S_SE_SL_Traverser()`
    `` | `LP_NL_O_OB_S_SE_SL_Traverser(T t, Step<T,?> step)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `equals(Object o)`
    `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.
    `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.LP_O_OB_S_SE_SL_Traverser

      `addLabels, detach, equals, path`

    - ### Methods inherited from class org.apache.tinkerpop.gremlin.process.traversal.traverser.O_OB_S_SE_SL_Traverser

      `bulk, equals, getSideEffects, getStepId, sack, sack, setBulk, setSideEffects, 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

      `attach, clone, dropLabels, dropPath, get, keepLabels, 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.Admin

      `isHalted`

    - ### Methods inherited from interface org.apache.tinkerpop.gremlin.process.traversal.Traverser

      `asAdmin, compareTo, path, path, sideEffects, sideEffects`

- - ### Field Detail

    - #### nestedLoops

          protected Stack<LabelledCounter> nestedLoops

    - #### loopNames

          protected ReferenceMap loopNames

  - ### Constructor Detail

    - #### LP_NL_O_OB_S_SE_SL_Traverser

          protected LP_NL_O_OB_S_SE_SL_Traverser()

    - #### LP_NL_O_OB_S_SE_SL_Traverser

          public LP_NL_O_OB_S_SE_SL_Traverser(T t,
                                              Step<T,?> step)

  - ### Method Detail

    - #### 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.
      Specified by:
        `loops` in interface `Traverser<T>`
      Overrides:
        `loops` in class `O_OB_S_SE_SL_Traverser<T>`
      Returns:
        The number of times the traverser has gone through a loop

    - #### 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.
      Specified by:
        `loops` in interface `Traverser<T>`
      Overrides:
        `loops` in class `O_OB_S_SE_SL_Traverser<T>`
      Parameters:
        `loopName` - the name applied to the loop or null for the containing loop
      Returns:
        The number of times the traverser has gone through a loop

    - #### 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 the `LoopsStep`
      Specified by:
        `initialiseLoops` in interface `Traverser.Admin<T>`
      Overrides:
        `initialiseLoops` in class `O_OB_S_SE_SL_Traverser<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 interface `Traverser.Admin<T>`
      Overrides:
        `incrLoops` in class `O_OB_S_SE_SL_Traverser<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 interface `Traverser.Admin<T>`
      Overrides:
        `resetLoops` in class `O_OB_S_SE_SL_Traverser<T>`

    - #### 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 `LP_O_OB_S_SE_SL_Traverser<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 `LP_O_OB_S_SE_SL_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 interface `Traverser.Admin<T>`
      Overrides:
        `merge` in class `O_OB_S_SE_SL_Traverser<T>`
      Parameters:
        `other` - the other traverser to merge into this traverser. Once merged, the other can be garbage collected.

    - #### equals

          public boolean equals(Object o)

      Overrides:
        `equals` in class `LP_O_OB_S_SE_SL_Traverser<T>`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `LP_O_OB_S_SE_SL_Traverser<T>`

Copyright © 2013–2022 Apache Software Foundation. All rights reserved.