Class MessageFactory
- java.lang.Object
-
- org.apache.commons.math.exception.util.MessageFactory
-
public class MessageFactory extends Object
Class for constructing localized messages.- Since:
- 2.2
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static String
buildMessage(Locale locale, Localizable pattern, Object... arguments)
Builds a message string by from a pattern and its arguments.static String
buildMessage(Locale locale, Localizable specific, Localizable general, Object... arguments)
Builds a message string by from two patterns (specific and general) and an argument list.
-
-
-
Method Detail
-
buildMessage
public static String buildMessage(Locale locale, Localizable pattern, Object... arguments)
Builds a message string by from a pattern and its arguments.- Parameters:
locale
- Locale in which the message should be translated.pattern
- Format specifier.arguments
- Format arguments.- Returns:
- a localized message string.
-
buildMessage
public static String buildMessage(Locale locale, Localizable specific, Localizable general, Object... arguments)
Builds a message string by from two patterns (specific and general) and an argument list.- Parameters:
locale
- Locale in which the message should be translated.specific
- Format specifier (may be null).general
- Format specifier (may be null).arguments
- Format arguments. They will be substituted in both thegeneral
andspecific
format specifiers.- Returns:
- a localized message string.
-
-