Constructor and Description |
---|
GraphFile()
Constructs a GraphFile with an empty underlying graph.
|
GraphFile(java.io.File inputFile)
Constructs a GraphFile with the information read from the specified
File.
|
GraphFile(Graph graph)
Constructs a GraphFile to work with the specified Graph.
|
GraphFile(GraphFile gf)
Constructs a new GraphFile with the same underlying graph as the
specified GraphFile.
|
Modifier and Type | Method and Description |
---|---|
Graph |
getGraph()
Gets the underlying graph being represented.
|
abstract void |
readFromFile(java.io.File inputFile)
Reads the graph information in the specified File into
the underlying Graph.
|
abstract void |
writeToFile(java.io.File outputFile)
Writes the underlying graph information to the specified File
in a specific file format.
|
public GraphFile()
public GraphFile(Graph graph)
graph
- The Graph to represent in a specific file formatpublic GraphFile(GraphFile gf)
gf
- The GraphFile to represent in a specific format.public GraphFile(java.io.File inputFile) throws java.io.IOException, java.util.zip.DataFormatException
inputFile
- java.io.IOException
java.util.zip.DataFormatException
public Graph getGraph()
public abstract void readFromFile(java.io.File inputFile) throws java.io.IOException, java.util.zip.DataFormatException
inputFile
- java.io.IOException
java.util.zip.DataFormatException
public abstract void writeToFile(java.io.File outputFile) throws java.io.IOException
outputFile
- java.io.IOException