Package com.ibm.icu.text
Class MessageFormat.PluralSelectorProvider
java.lang.Object
com.ibm.icu.text.MessageFormat.PluralSelectorProvider
- All Implemented Interfaces:
PluralFormat.PluralSelector
- Enclosing class:
MessageFormat
private static final class MessageFormat.PluralSelectorProvider
extends Object
implements PluralFormat.PluralSelector
This provider helps defer instantiation of a PluralRules object
until we actually need to select a keyword.
For example, if the number matches an explicit-value selector like "=1"
we do not need any PluralRules.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate MessageFormat
private PluralRules
private PluralRules.PluralType
-
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
msgFormat
-
rules
-
type
-
-
Constructor Details
-
PluralSelectorProvider
-
-
Method Details
-
select
Description copied from interface:PluralFormat.PluralSelector
Given a number, returns the appropriate PluralFormat keyword.- Specified by:
select
in interfacePluralFormat.PluralSelector
- Parameters:
ctx
- worker object for the selector.number
- The number to be plural-formatted.- Returns:
- The selected PluralFormat keyword.
-