Package org.graphstream.util
Class GraphDiff
java.lang.Object
org.graphstream.util.GraphDiff
public class GraphDiff extends Object
-
Constructor Summary
-
Method Summary
Modifier and Type Method Description voidapply(String sourceId, Sink g1)voidapply(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.voidend()Stop to record changes.static voidmain(String... args)voidreset()Clear all recorded changes.voidreverse(String sourceId, Sink g2)voidreverse(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.voidstart(Graph g)Start to record changes.StringtoString()
-
Constructor Details
-
Method Details
-
start
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
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
-
reverse
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
-
toString
-
main
- Throws:
Exception
-