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

pack-priv Class PluralSelectorFactory

extends Object
implements SelectorFactory
Class Inheritance
All Implemented Interfaces
com.ibm.icu.message2.SelectorFactory
Imports
java.util.Locale, .Map, com.ibm.icu.number.FormattedNumber, com.ibm.icu.text.FormattedValue, .PluralRules, .PluralRules.PluralType

Deprecated

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

Creates a Selector doing plural selection, similar to {exp, plural} in com.ibm.icu.text.MessageFormat.

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class
PluralSelectorFactory.PluralSelectorImpl

Deprecated as a consequence of Selector being deprecated.

Field Summary

Modifier and TypeField and Description
private final PluralRules.PluralType

Constructor Summary

AccessConstructor and Description
pack-priv
PluralSelectorFactory(String
the kind of plural selection we want
type
)

Creates a PluralSelectorFactory of the desired type.

Method Summary

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

Implements com.ibm.icu.message2.SelectorFactory.createSelector.

Deprecated as a consequence of Selector being deprecated.
The method that is called to create a selector.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

pluralTypeback to summary
private final PluralRules.PluralType pluralType

Constructor Detail

PluralSelectorFactoryback to summary
pack-priv PluralSelectorFactory(String type)

Creates a PluralSelectorFactory of the desired type.

Parameters
type:String

the kind of plural selection we want

Method Detail

createSelectorback to summary
public Selector createSelector(Locale locale, Map<String, Object> fixedOptions)

Implements com.ibm.icu.message2.SelectorFactory.createSelector.

Doc from com.ibm.icu.message2.SelectorFactory.createSelector.

Deprecated

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

The method that is called to create a selector.

Parameters
locale:Locale

the locale to use for selection.

fixedOptions:Map<String, Object>

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

Returns:Selector

The Selector.

Annotations
@Override
com.ibm.icu.message2 back to summary

private Class PluralSelectorFactory.PluralSelectorImpl

extends Object
implements Selector
Class Inheritance
  • java.lang.Object
  • com.ibm.icu.message2.PluralSelectorFactory.PluralSelectorImpl
All Implemented Interfaces
com.ibm.icu.message2.Selector

Deprecated

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

Field Summary

Modifier and TypeField and Description
private Map<String, Object>
private final PluralRules

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public boolean
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
)

Implements com.ibm.icu.message2.Selector.matches.

A method that is invoked for the object to match and each key.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

fixedOptionsback to summary
private Map<String, Object> fixedOptions
rulesback to summary
private final PluralRules rules

Constructor Detail

PluralSelectorImplback to summary
private PluralSelectorImpl(PluralRules rules, Map<String, Object> fixedOptions)

Method Detail

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

Implements com.ibm.icu.message2.Selector.matches.

Doc from com.ibm.icu.message2.Selector.matches.

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
@Override