public class Configuration
extends java.lang.Object
Class containing current Net2Plan-wide options, and methods to work with them.
In the current version the available options are:
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(java.util.Map<java.lang.String,java.lang.String> net2planParameters)
Checks the given options for validity.
|
static java.lang.String |
getOption(java.lang.String option)
Returns the value of an option.
|
static java.util.Map<java.lang.String,java.lang.String> |
getOptions()
Returns the current map of options.
|
static void |
readFromOptionsDefaultFile()
Reads options from the default file.
|
static void |
readFromOptionsFile(java.io.File f)
Reads options from a given file.
|
static void |
saveOptions()
Saves current options to the file system.
|
static void |
setOption(java.lang.String option,
java.lang.String value)
Puts the value for an option.
|
public static void check(java.util.Map<java.lang.String,java.lang.String> net2planParameters)
net2planParameters
- A key-value map with Net2Plan
-wide configuration optionspublic static void readFromOptionsFile(java.io.File f) throws java.io.IOException
f
- Options filejava.io.IOException
- If the specified file cannot be loadedpublic static void readFromOptionsDefaultFile() throws java.io.IOException
java.io.IOException
- If the specified file cannot be loadedpublic static java.util.Map<java.lang.String,java.lang.String> getOptions()
public static java.lang.String getOption(java.lang.String option)
option
- Option namepublic static void setOption(java.lang.String option, java.lang.String value)
option
- Option namevalue
- Option valuepublic static void saveOptions()