public final class DataValueLocalizer extends Object
Constructor and Description |
---|
DataValueLocalizer()
Constructs a DataValueLocalizer, using default Locale.
|
DataValueLocalizer(Locale locale)
Constructs a DataValueLocalizer, using specified locale.
|
Modifier and Type | Method and Description |
---|---|
DateFormat |
getDateFormatter()
Gets the date formatter for this instance.
|
Locale |
getLocale()
Gets the locale for this instance.
|
NumberFormat |
getNumberFormatter()
Gets the number formatter for this instance.
|
DateFormat |
getTimeFormatter()
Gets the time formatter for this instance.
|
TimeZone |
getTimeZone()
Gets the time zone for this instance.
|
void |
setDateFormatter(DateFormat dateFormatter)
Sets the date formatter of this Localizer.
|
void |
setLocale(Locale locale)
Sets the locale for this instance.
|
void |
setNumberFormatter(NumberFormat numberFormatter)
Sets the number formatter of this Localizer.
|
void |
setTimeFormatter(DateFormat timeFormatter)
Sets the time formatter of this Localizer.
|
void |
setTimeZone(TimeZone timeZone)
Sets the time zone of this Localizer.
|
public DataValueLocalizer()
All formatters, Time zone, etc. are defaulted.
public DataValueLocalizer(Locale locale)
All formatters, Time zone, etc. are defaulted.
locale
- the locale of the Localizer, or null if the
default locale of the Java VM is to be used.public Locale getLocale()
public TimeZone getTimeZone()
public NumberFormat getNumberFormatter()
public DateFormat getDateFormatter()
public DateFormat getTimeFormatter()
public void setLocale(Locale locale)
The number formatter, date formatter, and time formatter are set to default formatters for the specified locale.
locale
- the localepublic void setTimeZone(TimeZone timeZone)
timeZone
- the time zone. If null, a default
time zone for the locale of this
Localizer is used.public void setNumberFormatter(NumberFormat numberFormatter)
numberFormatter
- the number formatter. If null, a default
number formatter for the locale of this
Localizer is used.public void setDateFormatter(DateFormat dateFormatter)
dateFormatter
- the date formatter. If null, a default
date formatter for the locale of this
Localizer is used.public void setTimeFormatter(DateFormat timeFormatter)
timeFormatter
- the time formatter. If null, a default
time formatter for the locale of this
Localizer is used.Copyright © 2023. All rights reserved.