Java Map Substitute substituteUserConfiguration(String originalContent, Map paramAnchorTextAndValues)

Here you can find the source of substituteUserConfiguration(String originalContent, Map paramAnchorTextAndValues)

Description

substitute User Configuration

License

Apache License

Declaration

private static String substituteUserConfiguration(String originalContent,
            Map<String, String> paramAnchorTextAndValues) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import java.util.Map;
import java.util.Map.Entry;

public class Main {
    private static String substituteUserConfiguration(String originalContent,
            Map<String, String> paramAnchorTextAndValues) {

        for (Entry<String, String> entry : paramAnchorTextAndValues.entrySet()) {
            String anchorText = entry.getKey();
            String value = entry.getValue();

            originalContent = originalContent.replace(anchorText, value);
        }//w  w w.  ja v a 2s .c  o  m

        return originalContent;
    }
}

Related

  1. substituteForTokens(String input, Map tokenMap, boolean invertMap)
  2. substituteProfileProperty(String key, Map> configs)
  3. substituteSql(String template, Map map)
  4. substituteTokens(String pattern, Map tokens)
  5. substituteTokens(String pattern, Map tokens)