@ThreadSafe public class MessageFormatterFactory extends Object implements FormatterFactory<MessageFormatter>
| Constructor and Description |
|---|
MessageFormatterFactory(FormatterFactory<?>... factories) |
MessageFormatterFactory(Iterable<FormatterFactory<?>> factories) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
assertSameRoot(FormatterFactory<?> root) |
MessageFormatter |
createBy(Locale locale,
String pattern) |
MessageFormatter |
createBy(Locale locale,
String pattern,
FormatterFactory<?> root) |
protected MessageFormatter |
createByInternal(Locale locale,
String pattern) |
Iterable<FormatterFactory<?>> |
getFactories() |
protected FormatterFactory<?> |
getFactoryBy(String id) |
String |
getId() |
static MessageFormatterFactory |
messageFormatterFactory() |
protected Map<String,FormatterFactory<?>> |
toIdToFactory(Iterable<FormatterFactory<?>> factories) |
public MessageFormatterFactory(@Nullable Iterable<FormatterFactory<?>> factories)
public MessageFormatterFactory(@Nullable FormatterFactory<?>... factories)
@Nonnull public static MessageFormatterFactory messageFormatterFactory()
@Nonnull protected Map<String,FormatterFactory<?>> toIdToFactory(@Nullable Iterable<FormatterFactory<?>> factories)
@Nonnull protected FormatterFactory<?> getFactoryBy(@Nonnull String id) throws IllegalArgumentException
IllegalArgumentException@Nonnull public Iterable<FormatterFactory<?>> getFactories()
@Nonnull public String getId()
getId in interface FormatterFactory<MessageFormatter>@Nonnull public MessageFormatter createBy(@Nullable Locale locale, @Nullable String pattern)
@Nonnull public MessageFormatter createBy(@Nullable Locale locale, @Nullable String pattern, @Nonnull FormatterFactory<?> root)
createBy in interface FormatterFactory<MessageFormatter>protected MessageFormatter createByInternal(@Nullable Locale locale, @Nullable String pattern)
protected void assertSameRoot(@Nullable FormatterFactory<?> root)
Copyright © 2024 echocat. All rights reserved.