Top Description Inners Constructors Methods
com.ibm.icu.message2

pack-priv Class DateTimeFormatterFactory

extends Object
implements FormatterFactory
Class Inheritance
All Implemented Interfaces
com.ibm.icu.message2.FormatterFactory
Imports
java.util.Locale, .Map, .Objects, com.ibm.icu.impl.locale.AsciiUtil, com.ibm.icu.text.DateFormat, .SimpleDateFormat

Deprecated

as a consequence of FormatterFactory being deprecated. See corresponding docs for further information.

Creates a Formatter doing formatting of date / time, similar to {exp, date} and {exp, time} in com.ibm.icu.text.MessageFormat.

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class
DateTimeFormatterFactory.DateTimeFormatter

Deprecated as a consequence of Formatter being deprecated.

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public Formatter
createFormatter(Locale
the locale to use for formatting.
locale
,
Map<String, Object>
the options to use for formatting. The keys and values are function dependent.
fixedOptions
)

Implements com.ibm.icu.message2.FormatterFactory.createFormatter.

Deprecated as a consequence of Formatter being deprecated.
The method that is called to create a formatter.
private static int
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

DateTimeFormatterFactoryback to summary
pack-priv DateTimeFormatterFactory()

Method Detail

createFormatterback to summary
public Formatter createFormatter(Locale locale, Map<String, Object> fixedOptions)

Implements com.ibm.icu.message2.FormatterFactory.createFormatter.

Doc from com.ibm.icu.message2.FormatterFactory.createFormatter.

Deprecated

as a consequence of Formatter being deprecated. See corresponding docs for further information.

The method that is called to create a formatter.

Parameters
locale:Locale

the locale to use for formatting.

fixedOptions:Map<String, Object>

the options to use for formatting. The keys and values are function dependent.

Returns:Formatter

the formatter.

Annotations
@Override
Exceptions
IllegalArgumentException:
when something goes wrong (for example conflicting options, invalid option values, etc.)
stringToStyleback to summary
private static int stringToStyle(String option)
com.ibm.icu.message2 back to summary

private Class DateTimeFormatterFactory.DateTimeFormatter

extends Object
implements Formatter
Class Inheritance
  • java.lang.Object
  • com.ibm.icu.message2.DateTimeFormatterFactory.DateTimeFormatter
All Implemented Interfaces
com.ibm.icu.message2.Formatter

Deprecated

as a consequence of Formatter being deprecated. See corresponding docs for further information.

Field Summary

Modifier and TypeField and Description
private final DateFormat

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public FormattedPlaceholder
format(Object
the object to format.
toFormat
,
Map<String, Object>
options that are not know at build time.
variableOptions
)

Implements com.ibm.icu.message2.Formatter.format.

Deprecated as a consequence of FormattedPlaceholder being deprecated.
A method that takes the object to format and returns the i18n-aware formatted placeholder.
public String
formatToString(Object
the object to format.
toFormat
,
Map<String, Object>
options that are not know at build time.
variableOptions
)

Implements com.ibm.icu.message2.Formatter.formatToString.

A method that takes the object to format and returns the i18n-aware string representation.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

icuFormatterback to summary
private final DateFormat icuFormatter

Constructor Detail

DateTimeFormatterback to summary
private DateTimeFormatter(DateFormat df)

Method Detail

formatback to summary
public FormattedPlaceholder format(Object toFormat, Map<String, Object> variableOptions)

Implements com.ibm.icu.message2.Formatter.format.

Doc from com.ibm.icu.message2.Formatter.format.

Deprecated

as a consequence of FormattedPlaceholder being deprecated. See corresponding docs for further information.

A method that takes the object to format and returns the i18n-aware formatted placeholder.

Parameters
toFormat:Object

the object to format.

variableOptions:Map<String, Object>

options that are not know at build time.

Returns:FormattedPlaceholder

the formatted placeholder.

Annotations
@Override
formatToStringback to summary
public String formatToString(Object toFormat, Map<String, Object> variableOptions)

Implements com.ibm.icu.message2.Formatter.formatToString.

Doc from com.ibm.icu.message2.Formatter.formatToString.

A method that takes the object to format and returns the i18n-aware string representation.

Parameters
toFormat:Object

the object to format.

variableOptions:Map<String, Object>

options that are not know at build time.

Returns:String

the formatted string.

Annotations
@Override