Java Map Join joinMapValue(Map map, char connector)

Here you can find the source of joinMapValue(Map map, char connector)

Description

join Map Value

License

Open Source License

Declaration

public static String joinMapValue(Map<String, String> map,
            char connector) 

Method Source Code

//package com.java2s;
import java.util.Map;

public class Main {
    public static String joinMapValue(Map<String, String> map,
            char connector) {
        StringBuffer b = new StringBuffer();
        for (Map.Entry<String, String> entry : map.entrySet()) {
            b.append(entry.getKey());//from   w w  w  .j  a  va  2 s  . com
            b.append('=');
            if (entry.getValue() != null) {
                b.append(entry.getValue());
            }
            b.append(connector);
        }
        return b.toString();
    }
}

Related

  1. joinArgs(Map map, String sep, String split)
  2. joinLookup(Iterable elements, String separator, Map lookup)
  3. joinMap(Map map)
  4. joinMapToString(Map map, String sSeparator, String sMidSeparator)
  5. joinMapUnmodifiable(Map first, Map second)
  6. joinOnDelimiter(Map toJoin, char delimiter)
  7. joinOnSemicolon(Map toJoin)
  8. joinParameters(Map params)