Class MessageFormat
java.lang.Object
com.vmware.vipclient.i18n.l2.text.MessageFormat
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidapplyPattern(String pttrn) Sets the pattern used by this message format.voidapplyPattern(String pattern, MessagePattern.ApostropheMode aposMode) Sets the ApostropheMode and the pattern used by this message format.final StringBuilderformat(Object[] arguments, StringBuilder result, FieldPosition pos) final StringBuilderformat(Map<String, Object> arguments, StringBuilder result, FieldPosition pos)
-
Constructor Details
-
MessageFormat
public MessageFormat() -
MessageFormat
-
MessageFormat
-
-
Method Details
-
applyPattern
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
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:
IllegalArgumentException- if the pattern is invalid- See Also:
-
format
-
format
public final StringBuilder format(Map<String, Object> arguments, StringBuilder result, FieldPosition pos)
-