Class 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
    • 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 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