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:
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()
Checks value of current options.
|
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 void check()
public static void readFromOptionsFile(File f) throws IOException
f
- Options fileIOException
- If the specified file cannot be loadedpublic static void readFromOptionsDefaultFile() throws IOException
IOException
- If the specified file cannot be loadedpublic static Map<String,String> getOptions()
public static String getOption(String option)
option
- Option namepublic static void setOption(String option, String value)
option
- Option namevalue
- Option valuepublic static void saveOptions()