Java Map to String mapToStringBuilder(Map m)

Here you can find the source of mapToStringBuilder(Map m)

Description

map To String Builder

License

Open Source License

Declaration

public static StringBuilder mapToStringBuilder(Map<String, String> m) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.util.Map;

public class Main {
    public static StringBuilder mapToStringBuilder(Map<String, String> m) {
        StringBuilder sb = new StringBuilder();
        m.forEach((key, value) -> sb.append(key).append(":").append(value).append("\\"));
        sb.append("\n");
        return sb;
    }//from  www  . j  a v  a2 s.  c om
}

Related

  1. mapToString(Map parameterMap)
  2. mapToString(Map map, String splitter)
  3. mapToString(String aName, Map aMap, String aPrefix, String aSuffix, String aKeyValueSeparator, String anEntrySeparator, String anArrayPrefix, String anArraySuffix, String anArraySeparator, String anEscapeChars, char anEscapeSymbol)
  4. mapToString(String itemName, Map map)
  5. mapToStringArray(Map map)
  6. mapToStringList(Map map, String pairDelimiter, String listDelimiter)
  7. mapToStringMap(final Object map)
  8. toQueryString(Map ps)
  9. toStr(Map msg)