Details
-
Improvement
-
Status: Open
-
Major
-
Resolution: Unresolved
-
1.1
-
None
Description
It would be nice to have a simple formatting method in ExtendedMethodFormat:
String format(Object... arguments)
Intended use:
ExtendedMessageFormat messageFormat = new ExtendedMessageFormat("{0}, {1}", Locale.ROOT); String output = messageFormat.format("Hello", "World");
The current formatting method of (Extended)MethodFormat is quite inconvenient for simple use cases:
ExtendedMessageFormat messageFormat = new ExtendedMessageFormat("{0}, {1}", Locale.ROOT); Object[] arguments = { "Hello", "World" }; StringBuffer outputBuffer = messageFormat.format(arguments, new StringBuffer(), null); String output = outputBuffer.toString();