Spec-Zone .ru
спецификации, руководства, описания, API
|
public class DateTimeStringConverter extends StringConverter<java.util.Date>
StringConverter
implementation for Date
values that
represent a date and time.
DateStringConverter
,
TimeStringConverter
Modifier and Type | Field and Description |
---|---|
protected java.text.DateFormat |
dateFormat |
protected java.util.Locale |
locale |
protected java.lang.String |
pattern |
Constructor and Description |
---|
DateTimeStringConverter() |
DateTimeStringConverter(java.text.DateFormat dateFormat) |
DateTimeStringConverter(java.util.Locale locale) |
DateTimeStringConverter(java.util.Locale locale,
java.lang.String pattern) |
DateTimeStringConverter(java.lang.String pattern) |
Modifier and Type | Method and Description |
---|---|
java.util.Date |
fromString(java.lang.String value)
Converts the string provided into an object defined by the specific converter.
|
protected java.text.DateFormat |
getDateFormat()
Return a
DateFormat instance to use for formatting
and parsing in this StringConverter . |
java.lang.String |
toString(java.util.Date value)
Converts the object provided into its string form.
|
protected final java.util.Locale locale
protected final java.lang.String pattern
protected final java.text.DateFormat dateFormat
public DateTimeStringConverter()
public DateTimeStringConverter(java.util.Locale locale)
public DateTimeStringConverter(java.lang.String pattern)
public DateTimeStringConverter(java.util.Locale locale, java.lang.String pattern)
public DateTimeStringConverter(java.text.DateFormat dateFormat)
public java.util.Date fromString(java.lang.String value)
fromString
in class StringConverter<java.util.Date>
public java.lang.String toString(java.util.Date value)
toString
in class StringConverter<java.util.Date>
protected java.text.DateFormat getDateFormat()
Return a DateFormat
instance to use for formatting
and parsing in this StringConverter
.
Copyright (c) 2008, 2012, Oracle and/or its affiliates. All rights reserved. Use is subject to