1 /*
2 * Copyright (c) 2003, The JUNG Authors
3 *
4 * All rights reserved.
5 *
6 * This software is open-source under the BSD license; see either
7 * "license.txt" or
8 * https://github.com/jrtom/jung/blob/master/LICENSE for a description.
9 */
10 /*
11 * Created on Jan 6, 2002
12 *
13 */
14 package edu.uci.ics.jung.io;
15
16 import edu.uci.ics.jung.graph.Graph;
17
18
19 /**
20 * General interface for loading and saving a graph from/to disk.
21 * @author Scott
22 * @author Tom Nelson - converted to jung2
23 *
24 */
25 public interface GraphFile<V,E> {
26
27 /**
28 * Loads a graph from a file per the appropriate format
29 * @param filename the location and name of the file
30 * @return the graph
31 */
32 Graph<V,E> load(String filename);
33
34 /**
35 * Save a graph to disk per the appropriate format
36 * @param graph the location and name of the file
37 * @param filename the graph
38 */
39 void save(Graph<V,E> graph, String filename);
40 }