Class TemplateUtil


  • public class TemplateUtil
    extends Object

    Created by Jeff Gaynor
    on 3/1/18 at 10:14 AM

    • Field Detail

      • REGEX_LEFT_DELIMITER

        public static String REGEX_LEFT_DELIMITER
      • REGEX_RIGHT_DELIMITER

        public static String REGEX_RIGHT_DELIMITER
      • LEFT_DELIMITER

        public static String LEFT_DELIMITER
      • RIGHT_DELIMITER

        public static String RIGHT_DELIMITER
    • Constructor Detail

      • TemplateUtil

        public TemplateUtil()
    • Method Detail

      • replaceAll

        public static String replaceAll​(String template,
                                        Map replacements)
        Simple-minded template replacement. This works well for small, simple arguments.
        Parameters:
        template -
        replacements -
        Returns:
      • oldReplaceAll

        public static String oldReplaceAll​(String template,
                                           Map replacements)
      • newReplaceAll

        public static String newReplaceAll​(String template,
                                           Map replacements)
        Unlike oldReplaceAll(String, Map) this can handle nesting of the templates.
        Parameters:
        template -
        replacements -
        Returns:
      • main

        public static void main​(String[] args)