Class Configuration
java.lang.Object
ece.ing3.java.projet.configuration.Configuration
Configuration helper.
 
Offers a convenient way to get and set configuration parameters.
- Author:
- Virgile, Nicolas, Louis-Félix
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionstatic Preferencesget()Returns the underlying Preferences instance.static StringGet a configuration String value by key.static StringGet a configuration String value by key.static PathGets the application's data storage path for the current user.static voidinit()Loads the configuration.static voidsave()Saves the configuration.static voidSets a configuration value.
- 
Constructor Details- 
Configurationpublic Configuration()
 
- 
- 
Method Details- 
initpublic static void init()Loads the configuration.
- 
getReturns the underlying Preferences instance.- Returns:
- Preferences instance
 
- 
saveSaves the configuration.- Throws:
- BackingStoreException- Error while saving.
 
- 
getStringGet a configuration String value by key.- Parameters:
- key- Configuration key
- Returns:
- Value
 
- 
getStringGet a configuration String value by key.- Parameters:
- key- Configuration key
- defaultValue- Default value
- Returns:
- Value
 
- 
setSets a configuration value.- Parameters:
- key- Configuration key
- value- Value
 
- 
getUserDataPathGets the application's data storage path for the current user.- Returns:
- Application data storage path or nullon error
 
 
-