Interface PluralFormat.PluralSelector

All Known Implementing Classes:
MessageFormat.PluralSelectorProvider, PluralFormat.PluralSelectorAdapter
Enclosing class:
PluralFormat

static interface PluralFormat.PluralSelector
Interface for selecting PluralFormat keywords for numbers. The PluralRules class was intended to implement this interface, but there is no public API that uses a PluralSelector, only MessageFormat and PluralFormat have PluralSelector implementations. Therefore, PluralRules is not marked to implement this non-public interface, to avoid confusing users.
  • Method Summary

    Modifier and Type
    Method
    Description
    select(Object context, double number)
    Given a number, returns the appropriate PluralFormat keyword.
  • Method Details

    • select

      String select(Object context, double number)
      Given a number, returns the appropriate PluralFormat keyword.
      Parameters:
      context - worker object for the selector.
      number - The number to be plural-formatted.
      Returns:
      The selected PluralFormat keyword.