public void applyPattern ( String pattern ) { this . pattern = pattern ; if ( msgPattern == null ) { msgPattern = new MessagePattern ( ) ; } try { msgPattern . parsePluralStyle ( pattern ) ; offset = msgPattern . getPluralOffset ( 0 ) ; } catch ( RuntimeException e ) { resetPattern ( ) ; throw e ; } }
Sets the pattern used by this plural format . The method parses the pattern and creates a map of format strings for the plural rules . Patterns and their interpretation are specified in the class description .