Class DatePreference

    • Constructor Detail

      • DatePreference

        public DatePreference​(Preferences node,
                              String key,
                              Date def,
                              String pattern)
        Creates a date preference.
        Parameters:
        node - The Preferences node.
        key - The preferences key.
        def - The default value.
        pattern - The format pattern.
    • Method Detail

      • toString

        protected String toString​(Date value)
        Description copied from class: AbstractPreference
        Converts a value to a string using toString.

        If value is null, returns "".

        Overrides:
        toString in class AbstractPreference<Date>
        Parameters:
        value - The value.
        Returns:
        The corresponding string.
      • fromString

        protected Date fromString​(String s)
        Description copied from class: AbstractPreference
        Converts a string to a value using fomString.

        If s is null or empty, returns null.

        Overrides:
        fromString in class AbstractPreference<Date>
        Parameters:
        s - The string.
        Returns:
        The corresponding value.