@ThreadSafe public class ChoiceFormatter extends FormatterSupport
| Modifier and Type | Class and Description |
|---|---|
static class |
ChoiceFormatter.Condition |
protected static class |
ChoiceFormatter.Extraction |
protected static class |
ChoiceFormatter.ExtractionWithOperator |
protected static class |
ChoiceFormatter.Factory |
static class |
ChoiceFormatter.Operator |
| Constructor and Description |
|---|
ChoiceFormatter(Locale locale,
List<ChoiceFormatter.Condition> conditions) |
ChoiceFormatter(Locale locale,
String pattern,
FormatterFactory<?> root) |
| Modifier and Type | Method and Description |
|---|---|
static FormatterFactory<ChoiceFormatter> |
choiceFormatterFactory() |
protected ChoiceFormatter.Extraction |
extractPattern(char[] chars,
int begin) |
protected ChoiceFormatter.ExtractionWithOperator |
extractTestAndOperator(char[] chars,
int begin) |
void |
format(Object value,
Writer to) |
protected List<ChoiceFormatter.Condition> |
parse(String pattern,
FormatterFactory<?> root) |
String |
toString() |
getLocalepublic ChoiceFormatter(@Nonnull Locale locale, @Nullable List<ChoiceFormatter.Condition> conditions)
@Nonnull public static FormatterFactory<ChoiceFormatter> choiceFormatterFactory()
@Nonnull protected List<ChoiceFormatter.Condition> parse(@Nullable String pattern, @Nonnull FormatterFactory<?> root)
@Nonnull protected ChoiceFormatter.ExtractionWithOperator extractTestAndOperator(@Nonnull char[] chars, @Nonnegative int begin) throws IllegalArgumentException
IllegalArgumentException@Nonnull protected ChoiceFormatter.Extraction extractPattern(@Nonnull char[] chars, @Nonnegative int begin) throws IllegalArgumentException
IllegalArgumentExceptionpublic void format(@Nullable Object value, @Nonnull Writer to) throws IOException
IOExceptionCopyright © 2023 echocat. All rights reserved.