Package be.panako.util
Class Config
java.lang.Object
be.panako.util.Config
Writes and read the configuration values to and from a properties file.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic String
static boolean
getBoolean
(Key key) static float
static Config
static int
static String
getPreference
(String key) Use preferences to store configuration that changes during runtime and need to be persisted.readPreference
(String preferenceKey) static void
Sets a configuration value to use during the runtime of the application.static void
setPreference
(String key, String value) Use preferences to store configuration that changes during runtime and need to be persisted.void
writePreference
(String preferenceKey, String value)
-
Constructor Details
-
Config
public Config()Hidden default constructor. Reads the configured values, or stores the defaults.
-
-
Method Details
-
writePreference
-
readPreference
-
getInstance
-
get
-
getInt
-
getFloat
-
getBoolean
-
set
Sets a configuration value to use during the runtime of the application. These configuration values are not persisted. To- Parameters:
key
- The key to set.value
- The value to use.
-
setPreference
Use preferences to store configuration that changes during runtime and need to be persisted.- Parameters:
key
- The key to store.value
- The value to store
-
getPreference
Use preferences to store configuration that changes during runtime and need to be persisted.- Parameters:
key
- The key to store.- Returns:
- The configured preference value.
-