Package com.ibm.icu.message2
Class MessageFormatter.Builder
java.lang.Object
com.ibm.icu.message2.MessageFormatter.Builder
- Enclosing class:
MessageFormatter
Deprecated.
This API is for technology preview only.
A
Builder
used to build instances of MessageFormatter
.-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Deprecated.This API is for technology preview only.setDataModel
(Mf2DataModel dataModel) Deprecated.This API is for technology preview only.setFunctionRegistry
(Mf2FunctionRegistry functionRegistry) Deprecated.This API is for technology preview only.Deprecated.This API is for technology preview only.setPattern
(String pattern) Deprecated.This API is for technology preview only.
-
Method Details
-
setLocale
Deprecated.This API is for technology preview only.Sets the locale to use for all formatting and selection operations.- Parameters:
locale
- the locale to set.- Returns:
- the builder, for fluent use.
-
setPattern
Deprecated.This API is for technology preview only.Sets the pattern (in MessageFormat 2 syntax) used to create the message.
It conflicts with the data model, so it will reset it (the last call on setter wins).- Parameters:
pattern
- the pattern to set.- Returns:
- the builder, for fluent use.
-
setFunctionRegistry
@Deprecated public MessageFormatter.Builder setFunctionRegistry(Mf2FunctionRegistry functionRegistry) Deprecated.This API is for technology preview only.Sets an instance ofMf2FunctionRegistry
that should register any custom functions used by the message.There is no need to do this in order to use standard functions (for example date / time / number formatting, plural / ordinal / literal selection).
The exact set of standard functions, with the types they format and the options they accept is still TBD.- Parameters:
functionRegistry
- the function registry to set.- Returns:
- the builder, for fluent use.
-
setDataModel
Deprecated.This API is for technology preview only.Sets the data model used to create the message.
It conflicts with the pattern, so it will reset it (the last call on setter wins).- Parameters:
dataModel
- the pattern to set.- Returns:
- the builder, for fluent use.
-
build
Deprecated.This API is for technology preview only.Builds an instance ofMessageFormatter
.- Returns:
- the
MessageFormatter
created.
-