Package no.ntnu.idatt1002.demo
Class ConfigLoader
java.lang.Object
no.ntnu.idatt1002.demo.ConfigLoader
Class for loading properties from a config file.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static ConfigLoader
static Properties
Returns the properties.static Properties
Loads properties from the config file.static void
setProperty
(String key, String value) Sets a specified property.
-
Field Details
-
instance
-
properties
-
path
-
-
Constructor Details
-
ConfigLoader
private ConfigLoader()
-
-
Method Details
-
getInstance
-
load
Loads properties from the config file.- Parameters:
path
- The path to the config file.- Returns:
- The properties.
-
getProperties
Returns the properties.- Returns:
- The properties.
-
setProperty
Sets a specified property.- Parameters:
key
- The key of the property.value
- The value of the property.
-