Top Description Methods
com.ibm.icu.message2

public Interface Selector

Known Direct Implementers
com.ibm.icu.message2.TextSelectorFactory.TextSelector, com.ibm.icu.message2.PluralSelectorFactory.PluralSelectorImpl
Annotations
@Deprecated
Imports
java.util.Map

Deprecated

This API is for technology preview only.

The interface that must be implemented by all selectors that can be used from MessageFormatter.

Selectors are used to choose between different message variants, similar to plural, selectordinal, and select in com.ibm.icu.text.MessageFormat.

ICU Status
Internal ICU component: 72 technology preview

Method Summary

Modifier and TypeMethod and Description
public boolean

Returns:

the formatted string.
matches
(Object
the value to select on.
value
,
String
the key to test for matching.
key
,
Map<String, Object>
options that are not know at build time.
variableOptions
)

Deprecated This API is for technology preview only.
A method that is invoked for the object to match and each key.

Method Detail

matchesback to summary
public boolean matches(Object value, String key, Map<String, Object> variableOptions)

Deprecated

This API is for technology preview only.

A method that is invoked for the object to match and each key.

For example an English plural matches would return true for matches(1, "1"), matches(1, "one"), and matches(1, "*").

Parameters
value:Object

the value to select on.

key:String

the key to test for matching.

variableOptions:Map<String, Object>

options that are not know at build time.

Returns:boolean

the formatted string.

Annotations
@Deprecated
ICU Status
Internal ICU component: 72 technology preview