Class O_OB_S_SE_SL_Traverser<T>

    • Field Detail

      • loops

        protected short loops
      • loopName

        protected String loopName
      • future

        protected String future
      • bulk

        protected long bulk
    • Constructor Detail

      • O_OB_S_SE_SL_Traverser

        protected O_OB_S_SE_SL_Traverser()
      • O_OB_S_SE_SL_Traverser

        public O_OB_S_SE_SL_Traverser​(T t,
                                      Step<T,​?> step)
    • Method Detail

      • bulk

        public long bulk()
        Description copied from interface: Traverser
        A traverser may represent a grouping of traversers to allow for more efficient data propagation.
        Specified by:
        bulk in interface Traverser<T>
        Overrides:
        bulk in class AbstractTraverser<T>
        Returns:
        the number of traversers represented in this traverser.
      • sack

        public <S> S sack()
        Description copied from interface: Traverser
        Get the sack local sack object of this traverser.
        Specified by:
        sack in interface Traverser<T>
        Overrides:
        sack in class AbstractTraverser<T>
        Type Parameters:
        S - the type of the sack object
        Returns:
        the sack object
      • sack

        public <S> void sack​(S object)
        Description copied from interface: Traverser
        Set the traversers sack object to the provided value ("sack the value").
        Specified by:
        sack in interface Traverser<T>
        Overrides:
        sack in class AbstractTraverser<T>
        Type Parameters:
        S - the type of the object
        Parameters:
        object - the new value of the traverser's sack
      • 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 AbstractTraverser<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 AbstractTraverser<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
      • 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 the LoopsStep
        Specified by:
        initialiseLoops in interface Traverser.Admin<T>
        Overrides:
        initialiseLoops in class AbstractTraverser<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
      • 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 AbstractTraverser<T>
      • getStepId

        public String getStepId()
        Description copied from interface: Traverser.Admin
        Get the step id of where the traverser is located. This is typically used in multi-machine systems that require the movement of traversers between different traversal instances.
        Specified by:
        getStepId in interface Traverser.Admin<T>
        Overrides:
        getStepId in class AbstractTraverser<T>
        Returns:
        The future step for 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 O_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
      • 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_Traverser<T>
        Parameters:
        other - the other traverser to merge into this traverser. Once merged, the other can be garbage collected.