public class RouteAroundRegionManager
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
RouteAroundRegionManager.RegionManagerState
Data class representing the state of the region manager.
|
Modifier and Type | Method and Description |
---|---|
void |
addRegion(Shape region)
Adds a region to the manager if it is not
already in the list of regions to avoid.
|
static RouteAroundRegionManager |
getInstance() |
static boolean |
getIsLoaded() |
java.util.ArrayList<Shape> |
getRegions()
Get the list of regions we are
avoiding
|
boolean |
removeRegion(Shape region)
Attempts to remove the given region.
|
void |
restoreManagerStateFromFile(java.io.File f)
Restores the manager state from a file.
|
void |
saveManagerStateToFile(java.io.File f)
Saves the manager state by serializing it to a file
|
public static boolean getIsLoaded()
public static RouteAroundRegionManager getInstance()
public void addRegion(Shape region)
public boolean removeRegion(Shape region)
public java.util.ArrayList<Shape> getRegions()
public void restoreManagerStateFromFile(java.io.File f) throws java.io.IOException, org.json.JSONException
f
- The file to read from when restoring the manager's statejava.io.IOException
org.json.JSONException
public void saveManagerStateToFile(java.io.File f) throws java.io.IOException, org.json.JSONException
f
- The file to save the manager state to.java.io.IOException
org.json.JSONException