#22 extract save() methods to interface in edu.uci.ics.jung.io

open
nobody
None
5
2011-08-16
2011-08-16
Anonymous
No

Within the package edu.uci.ics.jung.io, the save() methods in classes such as PajetNetWriter should be extracted to an interface GraphWriter. This would allow clients to change output format without changing any code, eg:

public void saveGraph(GraphWriter writer) {
writer.save(myGraph, out, vs, nev);
}

which could then be called specifying whatever output format is required, eg:

saveGraph(new PajetNetWriter());

or:

saveGraph(new DotNetWriter());

Discussion

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks