Java Map to String mapToString(final Map map)

Here you can find the source of mapToString(final Map map)

Description

map To String

License

Apache License

Declaration

public static String mapToString(final Map<String, String> map) 

Method Source Code

//package com.java2s;
// Licensed to the Apache Software Foundation (ASF) under one

import java.util.Map;

public class Main {
    public static String mapToString(final Map<String, String> map) {
        String s = "";
        for (final Map.Entry<String, String> entry : map.entrySet()) {
            s += entry.getKey() + ":" + entry.getValue() + ";";
        }//  ww w .ja  v a  2s  .c  om
        if (s.length() > 0) {
            s = s.substring(0, s.length() - 1);
        }
        return s;
    }
}

Related

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