public class Configuration
extends Object
Class containing current Net2Plan-wide options, and methods to work with them.
In the current version the available options are:
workspace\BuiltInExamples.jar fileIn addition, due to the close relation to JOM library, some JOM-specific options can be configured:
Important: Values are stored in String format. Users are
responsible to make conversions to the appropiate type (i.e. double).
Important: Users should not access this class directly. All interfaces
for implementing user-made code (i.e. algorithms) include a map so-called
net2planParameters as input parameter, where users can find the
current configuration of the tool.
| Constructor and Description |
|---|
Configuration() |
| Modifier and Type | Method and Description |
|---|---|
static void |
check(Map<String,String> net2planParameters)
Checks the given options for validity.
|
static String |
getOption(String option)
Returns the value of an option.
|
static Map<String,String> |
getOptions()
Returns the current map of options.
|
static void |
readFromOptionsDefaultFile()
Reads options from the default file.
|
static void |
readFromOptionsFile(File f)
Reads options from a given file.
|
static void |
saveOptions()
Saves current options to the file system.
|
static void |
setOption(String option,
String value)
Puts the value for an option.
|
public static void check(Map<String,String> net2planParameters)
net2planParameters - A key-value map with Net2Plan-wide configuration optionspublic static String getOption(String option)
option - Option namepublic static Map<String,String> getOptions()
public static void readFromOptionsDefaultFile()
throws IOException
IOException - If the specified file cannot be loadedpublic static void readFromOptionsFile(File f)
throws IOException
f - Options fileIOException - If the specified file cannot be loadedpublic static void saveOptions()
public static void setOption(String option,
String value)
option - Option namevalue - Option value