public class StateGraph
extends java.lang.Object
| Constructor and Description |
|---|
StateGraph(java.lang.String fileName)
Build a StateGraph from a file.
|
public StateGraph(java.lang.String fileName)
throws java.io.FileNotFoundException
Alaska,Alabama,Mississippi,Tennessee,Georgia,FloridaNo state may be listed as a neighbor if it does not begin some line in the file.
fileName - The name of the file containing the graph specification.java.io.FileNotFoundException - If the file cannot be opened for reading.public java.util.ArrayList<State> getStates()
public State getState(java.lang.String name)
name - The name of the desired State.