- java.lang.Object
-
- de.carne.util.prefs.Preference<@NonNull java.nio.file.Path>
-
- de.carne.util.prefs.PathPreference
-
public class PathPreference extends Preference<@NonNull java.nio.file.Path>
Path preference access.
-
-
Constructor Summary
Constructors Constructor Description PathPreference(java.lang.String key, java.nio.file.Path defaultValue)Constructs a new PathPreference instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.nio.file.Pathget(java.util.prefs.Preferences prefs, java.nio.file.Path def)Gets this instance's preference value.voidput(java.util.prefs.Preferences prefs, java.nio.file.Path value)Sets this instance's preference value.-
Methods inherited from class de.carne.util.prefs.Preference
defaultValue, get, key, remove
-
-
-
-
Constructor Detail
-
PathPreference
public PathPreference(java.lang.String key, java.nio.file.Path defaultValue)Constructs a new PathPreference instance.- Parameters:
key- the preference key to access.defaultValue- the default preference value to use.
-
-
Method Detail
-
get
public java.nio.file.Path get(java.util.prefs.Preferences prefs, java.nio.file.Path def)Description copied from class:PreferenceGets this instance's preference value.- Specified by:
getin classPreference<@NonNull java.nio.file.Path>- Parameters:
prefs- the Preferences object to get the value from.def- the default preference value to return in case the preference is not defined.- Returns:
- the retrieved preference value.
-
put
public void put(java.util.prefs.Preferences prefs, java.nio.file.Path value)Description copied from class:PreferenceSets this instance's preference value.- Specified by:
putin classPreference<@NonNull java.nio.file.Path>- Parameters:
prefs- the Preferences object to set the value into.value- the preference value to set.
-
-