Class GraphDiff

java.lang.Object
org.graphstream.util.GraphDiff

public class GraphDiff
extends Object
  • Constructor Summary

    Constructors 
    Constructor Description
    GraphDiff()
    Create a new empty diff.
    GraphDiff​(Graph g1, Graph g2)
    Create a diff between two graphs.
  • Method Summary

    Modifier and Type Method Description
    void apply​(String sourceId, Sink g1)  
    void apply​(Sink g1)
    Considering this object is a diff between g1 and g2, calling this method will applied changes on g1 such that g1 will look like g2.
    void end()
    Stop to record changes.
    static void main​(String... args)  
    void reset()
    Clear all recorded changes.
    void reverse​(String sourceId, Sink g2)  
    void reverse​(Sink g2)
    Considering this object is a diff between g1 and g2, calling this method will applied changes on g2 such that g2 will look like g1.
    void start​(Graph g)
    Start to record changes.
    String toString()  

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • GraphDiff

      public GraphDiff()
      Create a new empty diff.
    • GraphDiff

      public GraphDiff​(Graph g1, Graph g2)
      Create a diff between two graphs.
      Parameters:
      g1 -
      g2 -
  • Method Details

    • start

      public void start​(Graph g)
      Start to record changes. If a record is already started, then it will be ended.
      Parameters:
      g - the graph to start listening for changes.
    • end

      public void end()
      Stop to record changes. If there is no record, calling this method has no effect.
    • reset

      public void reset()
      Clear all recorded changes.
    • apply

      public void apply​(Sink g1)
      Considering this object is a diff between g1 and g2, calling this method will applied changes on g1 such that g1 will look like g2.
      Parameters:
      g1 -
    • apply

      public void apply​(String sourceId, Sink g1)
    • reverse

      public void reverse​(Sink g2)
      Considering this object is a diff between g1 and g2, calling this method will applied changes on g2 such that g2 will look like g1.
      Parameters:
      g2 -
    • reverse

      public void reverse​(String sourceId, Sink g2)
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • main

      public static void main​(String... args) throws Exception
      Throws:
      Exception