Package cdc.prefs.defaults
Class DatePreference
- All Implemented Interfaces:
Preference<Date>
Date preference (node, key) pair.
- Author:
- Damien Carbonne
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumEnumeration of default formats. -
Constructor Summary
ConstructorsConstructorDescriptionDatePreference(Preferences node, String key, Date def, DatePreference.Format format) DatePreference(Preferences node, String key, Date def, String pattern) Creates a date preference. -
Method Summary
Methods inherited from class cdc.prefs.AbstractPreference
get, getDefaultValue, getKey, getNode, getValueClass, putMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface cdc.prefs.Preference
get
-
Constructor Details
-
DatePreference
Creates a date preference.- Parameters:
node- The Preferences node.key- The preferences key.def- The default value.pattern- The format pattern.
-
DatePreference
-
-
Method Details
-
toString
Description copied from class:AbstractPreferenceConverts a value to a string usingtoString.If
valueisnull, returns"".- Overrides:
toStringin classAbstractPreference<Date>- Parameters:
value- The value.- Returns:
- The corresponding string.
-
fromString
Description copied from class:AbstractPreferenceConverts a string to a value usingfomString.If
sisnullor empty, returnsnull.- Overrides:
fromStringin classAbstractPreference<Date>- Parameters:
s- The string.- Returns:
- The corresponding value.
-