public class MessageFormatFactory extends Object
Comparing constructor/factory and format together:
Constructor: 1148.127153
Factory....: 283.366235
4 times improvement
Comparing constructor/factory only:
Constructor: 985.182660
Factory....: 42.602040
23 times improvement
Longer or more complicated patterns should benefit even more (this assertion not tested).| Modifier and Type | Method and Description |
|---|---|
static UnmodifiableMessageFormat |
getMessageFormat(String pattern)
Gets a message format for the provided format in the current thread locale.
|
static UnmodifiableMessageFormat |
getMessageFormat(String pattern,
Locale locale)
Gets a message format for the provided format and locale.
|
public static UnmodifiableMessageFormat getMessageFormat(String pattern)
ThreadLocalepublic static UnmodifiableMessageFormat getMessageFormat(String pattern, Locale locale)
Copyright © 2016. All rights reserved.