Class I18nFormatUtil

    • Constructor Detail

      • I18nFormatUtil

        public I18nFormatUtil()
    • Method Detail

      • tryFormatSatisfiability

        public static void tryFormatSatisfiability​(java.lang.String format)
                                            throws java.util.IllegalFormatException
        Throws an exception if the format is not syntactically valid.
        Parameters:
        format - the format string to parse
        Throws:
        java.util.IllegalFormatException
      • formatParameterCategories

        public static I18nConversionCategory[] formatParameterCategories​(java.lang.String format)
                                                                  throws java.util.IllegalFormatException
        Returns a I18nConversionCategory for every conversion found in the format string.
        Parameters:
        format - the format string to parse
        Throws:
        java.util.IllegalFormatException - if the format is not syntactically valid
      • hasFormat

        @I18nChecksFormat
        public 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 I18nConversionCategorys. Otherwise an error is thrown.
        Parameters:
        format - a format string
        cc - a list of expected categories for the string's format specifiers
        Returns:
        true if the format string's specifiers are the given categories, in order
      • isFormat

        @I18nValidFormat
        public static boolean isFormat​(java.lang.String format)