Annotation Type Messages.PluralCount

Enclosing interface:
Messages

@Retention(RUNTIME) @Target(PARAMETER) public static @interface Messages.PluralCount
Provides multiple plural forms based on a count. The selection of which plural form is performed by a PluralRule implementation. This annotation is applied to a single parameter of a Messages subinterface and indicates that parameter is to be used to choose the proper plural form of the message. The parameter chosen must be of type short or int. Optionally, a class literal referring to a PluralRule implementation can be supplied as the argument if the standard implementation is insufficient.

Example:

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