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 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()
-
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
-