Package diva.graph.toolbox
Class GraphLogger
- java.lang.Object
-
- diva.graph.toolbox.GraphLogger
-
- All Implemented Interfaces:
GraphListener
,java.util.EventListener
public class GraphLogger extends java.lang.Object implements GraphListener
A logger of graph events. Every event that is sent to this logger is stored in a log which can then be printed out or otherwise analyzed.- Version:
- $Id$
- Author:
- Michael Shilman
- Pt.AcceptedRating:
- Red
-
-
Constructor Summary
Constructors Constructor Description GraphLogger()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
edgeHeadChanged(GraphEvent e)
Add this event to the log.void
edgeTailChanged(GraphEvent e)
Add this event to the log.java.util.Iterator
iterator()
Return a sequentially-sorted iterator over the GraphEvent objects contained by the log.void
nodeAdded(GraphEvent e)
Add this event to the log.void
nodeRemoved(GraphEvent e)
Add this event to the log.void
structureChanged(GraphEvent e)
Add this event to the log.java.lang.String
toString()
Print the contents of the log into a string.
-
-
-
Method Detail
-
edgeHeadChanged
public void edgeHeadChanged(GraphEvent e)
Add this event to the log.- Specified by:
edgeHeadChanged
in interfaceGraphListener
-
edgeTailChanged
public void edgeTailChanged(GraphEvent e)
Add this event to the log.- Specified by:
edgeTailChanged
in interfaceGraphListener
-
nodeAdded
public void nodeAdded(GraphEvent e)
Add this event to the log.- Specified by:
nodeAdded
in interfaceGraphListener
-
nodeRemoved
public void nodeRemoved(GraphEvent e)
Add this event to the log.- Specified by:
nodeRemoved
in interfaceGraphListener
-
structureChanged
public void structureChanged(GraphEvent e)
Add this event to the log.- Specified by:
structureChanged
in interfaceGraphListener
-
iterator
public java.util.Iterator iterator()
Return a sequentially-sorted iterator over the GraphEvent objects contained by the log.
-
toString
public java.lang.String toString()
Print the contents of the log into a string.- Overrides:
toString
in classjava.lang.Object
-
-