Class ContextTraverser

java.lang.Object
repast.simphony.engine.controller.ContextTraverser
All Implemented Interfaces:
Traverser<Context>

public class ContextTraverser extends Object implements Traverser<Context>
A Traverser that traverses Contexts by returning the subContexts of passed in Contexts.
Version:
$Revision: 1.1 $ $Date: 2005/12/21 22:25:34 $
Author:
Jerry Vos
  • Constructor Details

    • ContextTraverser

      public ContextTraverser()
  • Method Details

    • getSuccessors

      public Iterator<Context> getSuccessors(Context previousContext, Context currentContext)
      Returns the subContexts of the currentContext.
      Specified by:
      getSuccessors in interface Traverser<Context>
      Parameters:
      previousContext - ignored
      currentContext - the context who's subContexts to return
      Returns:
      An iterator that will return the next nodes to visit in the graph traversal.
      See Also:
    • getDistance

      public double getDistance(Context fromNode, Context toNode)
      Currently just returns 0.
      Specified by:
      getDistance in interface Traverser<Context>
      Parameters:
      fromNode - ignored
      toNode - ignored
      Returns:
      0