Java Map Replace replaceNotContainedWithReplaced(String sentStr, Map mapNotContainedReplaced)

Here you can find the source of replaceNotContainedWithReplaced(String sentStr, Map mapNotContainedReplaced)

Description

replace Not Contained With Replaced

License

Apache License

Declaration

public static String replaceNotContainedWithReplaced(String sentStr,
            Map<String, String> mapNotContainedReplaced) 

Method Source Code

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

import java.util.Map;

public class Main {
    public static String replaceNotContainedWithReplaced(String sentStr,
            Map<String, String> mapNotContainedReplaced) {
        for (String notContained : mapNotContainedReplaced.keySet()) {
            sentStr = sentStr.replace(notContained,
                    mapNotContainedReplaced.get(notContained));
        }//from   ww w .jav a2s.  com

        return sentStr;
    }
}

Related

  1. replaceKeyCharacter(Map map, char oldChar, char newChar)
  2. replaceKeyword(String messageTemplate, Map args, String key)
  3. replaceMap(String inStr, Map replaceMap)
  4. replaceMethodUriWithValues(String methodUri, Map urlParameterKeyValues)
  5. replaceNode(Map map, Map replacement, List pathItems)
  6. replaceOpcodeNames(HashMap replacementValues, final String input)
  7. replaceParameters(final String value, final Map paramMap)
  8. replaceParameters(Map map, Map originals, Map defaults, Map hards)
  9. replaceParameters(String query, Map parameters)