jlibs.core.graph.walkers
Class PreorderWalker<E>

java.lang.Object
  extended by jlibs.core.graph.sequences.AbstractSequence<E>
      extended by jlibs.core.graph.walkers.PreorderWalker<E>
All Implemented Interfaces:
Sequence<E>, Walker<E>

public class PreorderWalker<E>
extends AbstractSequence<E>
implements Walker<E>

Author:
Santhosh Kumar T

Field Summary
 
Fields inherited from class jlibs.core.graph.sequences.AbstractSequence
current
 
Constructor Summary
PreorderWalker(E elem, Navigator<E> navigator)
           
PreorderWalker(Sequence<? extends E> seq, Navigator<E> navigator)
           
 
Method Summary
 void addBreakpoint()
           
 PreorderWalker<E> copy()
           
protected  E findNext()
           
 Path getCurrentPath()
           
 boolean isPaused()
           
static void main(String[] args)
           
 void reset()
           
 void resume()
           
 void skip()
           
 
Methods inherited from class jlibs.core.graph.sequences.AbstractSequence
current, findNext, hasNext, index, length, next, next
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface jlibs.core.graph.Sequence
current, hasNext, index, length, next, next
 

Constructor Detail

PreorderWalker

public PreorderWalker(Sequence<? extends E> seq,
                      Navigator<E> navigator)

PreorderWalker

public PreorderWalker(E elem,
                      Navigator<E> navigator)
Method Detail

reset

public void reset()
Specified by:
reset in interface Sequence<E>
Overrides:
reset in class AbstractSequence<E>

copy

public PreorderWalker<E> copy()
Specified by:
copy in interface Sequence<E>

findNext

protected E findNext()
Specified by:
findNext in class AbstractSequence<E>

getCurrentPath

public Path getCurrentPath()
Specified by:
getCurrentPath in interface Walker<E>

skip

public void skip()
Specified by:
skip in interface Walker<E>

addBreakpoint

public void addBreakpoint()
Specified by:
addBreakpoint in interface Walker<E>

isPaused

public boolean isPaused()
Specified by:
isPaused in interface Walker<E>

resume

public void resume()
Specified by:
resume in interface Walker<E>

main

public static void main(String[] args)


Copyright © 2018. All rights reserved.