code: public static String substitute(String source, Map<String, String> substitions) {
  
          String result = source;
          Iterator<Map.Entry<String, String>> it = substitions.entrySet().iterator();
          while (it.hasNext()) {
              Map.Entry<String, String> entry = it.next();
              result = substitute(result, entry.getKey(), entry.getValue().toString());
          }
          return result;
      }
docs: Replaces a set of <code>searchString</code> and <code>replaceString</code> pairs,
  given by the <code>substitutions</code> Map parameter.<p>
  
  @param source the string to scan
  @param substitions the map of substitutions
  
  @return the substituted String
  
  @see #substitute(String, String, String)