Class MessageFormat

java.lang.Object
com.vmware.vipclient.i18n.l2.text.MessageFormat

public class MessageFormat extends Object
  • Constructor Details

    • MessageFormat

      public MessageFormat()
    • MessageFormat

      public MessageFormat(String pattern)
    • MessageFormat

      public MessageFormat(String pattern, Locale locale)
  • Method Details

    • applyPattern

      public void applyPattern(String pttrn)
      Sets the pattern used by this message format. Parses the pattern and caches Format objects for simple argument types. Patterns and their interpretation are specified in the class description.
      Parameters:
      pttrn - the pattern for this message format
      Throws:
      IllegalArgumentException - if the pattern is invalid
    • applyPattern

      public void applyPattern(String pattern, MessagePattern.ApostropheMode aposMode)
      Sets the ApostropheMode and the pattern used by this message format. Parses the pattern and caches Format objects for simple argument types. Patterns and their interpretation are specified in the class description.

      This method is best used only once on a given object to avoid confusion about the mode, and after constructing the object with an empty pattern string to minimize overhead.

      Parameters:
      pattern - the pattern for this message format
      aposMode - the new ApostropheMode
      Throws:
      IllegalArgumentException - if the pattern is invalid
      See Also:
    • format

      public final StringBuilder format(Object[] arguments, StringBuilder result, FieldPosition pos)
    • format

      public final StringBuilder format(Map<String,Object> arguments, StringBuilder result, FieldPosition pos)