Class AbstractFormattedPlaceholderPopulator

    • Constructor Detail

      • AbstractFormattedPlaceholderPopulator

        AbstractFormattedPlaceholderPopulator()
    • Method Detail

      • attachQuotedString

        protected int attachQuotedString​(int index,
                                         java.lang.StringBuilder builder,
                                         char[] formatArray)
        Processes quoted string inside format array. It is expected that provided index points to the apostrophe character so that since the index + 1 position quoted string starts.

        String may contain escaped apostrophes \' which processed as characters. Backslash is used for escaping so you need double backslash to print it \\. All the rest backslashes (not followed by apostrophe or one more backslash) are simply ignored.

        Parameters:
        index - is a index of apostrophe starting a new quoted string
        builder - is a StringBuilder building a resulting formatted string. It is updated by the method: quoted string is attached
        formatArray - is a format representation
        Returns:
        index of the character after the closing apostrophe
        Throws:
        java.lang.IllegalArgumentException - if there is no closing apostrophe
      • isLetter

        protected final boolean isLetter​(char ch)
        Checks if provided character is a latin letter.
        Parameters:
        ch - is character to check
        Returns:
        true if character is a latin letter and false otherwise