public class I18nFormatUtil
extends java.lang.Object
Constructor and Description |
---|
I18nFormatUtil() |
Modifier and Type | Method and Description |
---|---|
static I18nConversionCategory[] |
formatParameterCategories(java.lang.String format)
Returns a
I18nConversionCategory for every conversion found in the format string. |
static boolean |
hasFormat(java.lang.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(java.lang.String format) |
static void |
tryFormatSatisfiability(java.lang.String format)
Throws an exception if the format is not syntactically valid.
|
public static void tryFormatSatisfiability(java.lang.String format) throws java.util.IllegalFormatException
format
- the format string to parsejava.util.IllegalFormatException
public static I18nConversionCategory[] formatParameterCategories(java.lang.String format) throws java.util.IllegalFormatException
I18nConversionCategory
for every conversion found in the format string.format
- the format string to parsejava.util.IllegalFormatException
- if the format is not syntactically valid@I18nChecksFormat public static boolean hasFormat(java.lang.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(java.lang.String format)