@AnnotatedFor(value="nullness") public class I18nFormatUtil extends Object
Constructor and Description |
---|
I18nFormatUtil() |
Modifier and Type | Method and Description |
---|---|
static I18nConversionCategory[] |
formatParameterCategories(String format)
Returns a
I18nConversionCategory for every conversion found in the format string. |
static boolean |
hasFormat(String format,
I18nConversionCategory... cc)
Returns true if the format string is satisfiable, and if the format's parameters match the
passed
I18nConversionCategory s. |
static boolean |
isFormat(String format) |
static void |
tryFormatSatisfiability(String format)
Throws an exception if the format is not syntactically valid.
|
public static void tryFormatSatisfiability(String format) throws IllegalFormatException
format
- the format string to parseIllegalFormatException
public static I18nConversionCategory[] formatParameterCategories(String format) throws IllegalFormatException
I18nConversionCategory
for every conversion found in the format string.format
- the format string to parseIllegalFormatException
- if the format is not syntactically valid@I18nChecksFormat public static boolean hasFormat(String format, I18nConversionCategory... cc)
I18nConversionCategory
s. Otherwise an error is thrown.format
- a format stringcc
- a list of expected categories for the string's format specifiers@I18nValidFormat public static boolean isFormat(String format)