Annotation Type Messages.PluralText

Enclosing interface:
Messages

@Retention(RUNTIME) @Target(METHOD) @Documented @Deprecated public static @interface Messages.PluralText
Deprecated.
Provides multiple plural forms based on a count. The selection of which plural form to use is based on the value of the argument marked PluralCount, which may also specify an alternate plural rule to use.

Example:

   @DefaultMessage("You have {0} widgets.")
   @PluralText({"one", "You have one widget.")
   String example(@PluralCount int count)
 

  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    Deprecated.
    An array of pairs of strings containing the strings for different plural forms.
  • Element Details

    • value

      String[] value
      Deprecated.
      An array of pairs of strings containing the strings for different plural forms. Each pair is the name of the plural form (as returned by PluralForm.toString) followed by the string for that plural form. An example for a locale that has "none", "one", and "other" plural forms:
       @DefaultMessage("{0} widgets")
       @PluralText({"none", "No widgets", "one", "One widget"})
       
      "other" must not be included in this array as it will map to the DefaultMessage value.