GWT 2.7.0

com.google.gwt.i18n.client
Annotation Type Messages.Offset


@Retention(value=RUNTIME)
@Target(value=PARAMETER)
public static @interface Messages.Offset

Ignored except on parameters also tagged with Messages.PluralCount, and provides an offset to be subtracted from the value before a plural rule is chosen or the value is formatted. Note that "=n" forms are evaluated before this offset is applied.

Example:

   @PluralText({"=0", "No one has recommended this movie",
     "=1", "{0} has recommended this movie",
     "=2", "{0} and {1} have recommended this movie",
     "one", "{0}, {1} and one other have recommended this movie"})
   @DefaultMessage("{0}, {1} and {2,number} others have recommended this movie")
   String recommenders(@Optional String rec1, @Optional String rec2,
     @PluralCount @Offset(2) int count);
 
would result in
 recommenders("John", null, 1) => "John has..."
 recommenders("John", "Jane", 3) => "John, Jane, and one other..."
 recommenders("John", "Jane", 1402) => "John, Jane, and 1,400 others..."
 


Required Element Summary
 int value
           
 

Element Detail

value

public abstract int value

GWT 2.7.0