Java Map to String mapToStr(Map map)

Here you can find the source of mapToStr(Map map)

Description

map To Str

License

Apache License

Declaration

public static String mapToStr(Map<String, Object> map) 

Method Source Code

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

import java.util.*;

public class Main {
    public static String mapToStr(Map<String, Object> map) {
        String str = "";
        Set<String> keySet = map.keySet();

        Iterator<String> iter = keySet.iterator();

        while (iter.hasNext()) {
            String key = iter.next();
            str += key + "=" + map.get(key) + "&";
        }// w  w  w .  j  a  v a 2 s . c  om
        return str.substring(0, str.length() - 1);
    }
}

Related

  1. mapToStr(java.util.Map hm, char sep1, char sep2)
  2. mapToStr(Map map)
  3. mapToString(final Map m)
  4. mapToString(final Map m)
  5. mapToString(final Map map)
  6. mapToString(Map map)