Class ShortestPathTextObserver
- java.lang.Object
-
- org.insa.graphs.algorithm.shortestpath.ShortestPathTextObserver
-
- All Implemented Interfaces:
ShortestPathObserver
public class ShortestPathTextObserver extends java.lang.Object implements ShortestPathObserver
-
-
Constructor Summary
Constructors Constructor Description ShortestPathTextObserver(java.io.PrintStream stream)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
notifyDestinationReached(Node node)
Notify the observer that the destination has been reached.void
notifyNodeMarked(Node node)
Notify the observer that a node has been marked, i.e.void
notifyNodeReached(Node node)
Notify the observer that a node has been reached for the first time.void
notifyOriginProcessed(Node node)
Notify the observer that the origin has been processed.
-
-
-
Method Detail
-
notifyOriginProcessed
public void notifyOriginProcessed(Node node)
Description copied from interface:ShortestPathObserver
Notify the observer that the origin has been processed.- Specified by:
notifyOriginProcessed
in interfaceShortestPathObserver
- Parameters:
node
- Origin.
-
notifyNodeReached
public void notifyNodeReached(Node node)
Description copied from interface:ShortestPathObserver
Notify the observer that a node has been reached for the first time.- Specified by:
notifyNodeReached
in interfaceShortestPathObserver
- Parameters:
node
- Node that has been reached.
-
notifyNodeMarked
public void notifyNodeMarked(Node node)
Description copied from interface:ShortestPathObserver
Notify the observer that a node has been marked, i.e. its final value has been set.- Specified by:
notifyNodeMarked
in interfaceShortestPathObserver
- Parameters:
node
- Node that has been marked.
-
notifyDestinationReached
public void notifyDestinationReached(Node node)
Description copied from interface:ShortestPathObserver
Notify the observer that the destination has been reached.- Specified by:
notifyDestinationReached
in interfaceShortestPathObserver
- Parameters:
node
- Destination.
-
-