Module de.carne

Class 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.Path get​(java.util.prefs.Preferences prefs, java.nio.file.Path def)
      Gets this instance's preference value.
      void put​(java.util.prefs.Preferences prefs, java.nio.file.Path value)
      Sets this instance's preference value.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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: Preference
        Gets this instance's preference value.
        Specified by:
        get in class Preference<@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: Preference
        Sets this instance's preference value.
        Specified by:
        put in class Preference<@NonNull java.nio.file.Path>
        Parameters:
        prefs - the Preferences object to set the value into.
        value - the preference value to set.