Package cdc.converters.defaults
Class StringToDate
String to Date converter.
A String can be converted to Date using:
- Nothing: different default formats are tested.
- A DateFormat.
- A pattern and an optional Locale.
- Author:
- Damien Carbonne
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringToDatestatic final StringToDatestatic final StringToDatestatic final StringToDatestatic final StringToDatestatic final Factory<StringToDate>static final FormalArg<DateFormat>static final FormalArgsstatic final FormalArgsstatic final StringToDatestatic final StringToDatestatic final StringToDatestatic final StringToDatestatic final StringToDateFields inherited from interface cdc.converters.Converter
META_FARGS, SOURCE_CLASS, TARGET_CLASS -
Method Summary
Modifier and TypeMethodDescriptionstatic StringToDatestatic StringToDatecreate(DateFormat format) Methods inherited from class cdc.converters.AbstractConverter
getSourceClass, getTargetClass, getWrappedSourceClass, getWrappedTargetClass, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface cdc.converters.Converter
adapt, andThen, andThenRaw, applyRaw, areCompliantSourceAndTargetClasses, areMatchingSourceAndTargetClasses, cast, compose, composeRaw, isCompliantSourceClass, isCompliantTargetClass, isMatchingSourceClass, isMatchingTargetClass, orElse, orElseRaw
-
Field Details
-
AUTO
-
DASH_YYYY_MM_DD
-
SLASH_YYYY_MM_DD
-
DASH_DD_MM_YYYY
-
SLASH_DD_MM_YYYY
-
HH_MM_SS
-
DASH_YYYY_MM_DD_HH_MM_SS
-
SLASH_YYYY_MM_DD_HH_MM_SS
-
DASH_DD_MM_YYYY_HH_MM_SS
-
SLASH_DD_MM_YYYY_HH_MM_SS
-
FORMAT
-
FPARAMS_FORMAT
-
PATTERN
-
LOCALE
-
FPARAMS_PATTERN_LOCALE
-
FACTORY
-
-
Method Details
-
create
-
create
-
getFormat
- Returns:
- The optional format.
-
getPattern
- Returns:
- The optional pattern.
-
getLocale
- Returns:
- The optional Locale.
-
apply
-
getParams
- Returns:
- The parameters used to configure this converter.
-