Class MessageFormat
- java.lang.Object
-
- com.vmware.vipclient.i18n.l2.text.MessageFormat
-
public class MessageFormat extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classMessageFormat.Field2
-
Constructor Summary
Constructors Constructor Description MessageFormat()MessageFormat(java.lang.String pattern)MessageFormat(java.lang.String pattern, java.util.Locale locale)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidapplyPattern(java.lang.String pttrn)Sets the pattern used by this message format.voidapplyPattern(java.lang.String pattern, MessagePattern.ApostropheMode aposMode)Sets the ApostropheMode and the pattern used by this message format.java.lang.StringBuilderformat(java.lang.Object[] arguments, java.lang.StringBuilder result, java.text.FieldPosition pos)java.lang.StringBuilderformat(java.util.Map<java.lang.String,java.lang.Object> arguments, java.lang.StringBuilder result, java.text.FieldPosition pos)
-
-
-
Method Detail
-
applyPattern
public void applyPattern(java.lang.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:
java.lang.IllegalArgumentException- if the pattern is invalid
-
applyPattern
public void applyPattern(java.lang.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 formataposMode- the new ApostropheMode- Throws:
java.lang.IllegalArgumentException- if the pattern is invalid- See Also:
MessagePattern.ApostropheMode
-
format
public final java.lang.StringBuilder format(java.lang.Object[] arguments, java.lang.StringBuilder result, java.text.FieldPosition pos)
-
format
public final java.lang.StringBuilder format(java.util.Map<java.lang.String,java.lang.Object> arguments, java.lang.StringBuilder result, java.text.FieldPosition pos)
-
-