Java Map to String MapToString(Map map)

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

Description

Map To String

License

Open Source License

Declaration

public static String MapToString(Map<String, String> map) 

Method Source Code


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

import java.util.Map;
import java.util.Iterator;

public class Main {
    public static String MapToString(Map<String, String> map) {
        String result = "";
        Iterator<String> keySetIterator = map.keySet().iterator();
        while (keySetIterator.hasNext()) {
            String key = keySetIterator.next();
            result += "|" + key + ":" + map.get(key);
        }/*from w  w w  .j a  va2 s . c om*/
        return result;
    }
}

Related

  1. mapToString(Map criteria)
  2. mapToString(Map map)
  3. mapToString(Map map)
  4. mapToString(Map map)
  5. mapToString(Map map)
  6. mapToString(Map map)
  7. mapToString(Map parameterMap)
  8. mapToString(Map map, String splitter)
  9. mapToString(String aName, Map aMap, String aPrefix, String aSuffix, String aKeyValueSeparator, String anEntrySeparator, String anArrayPrefix, String anArraySuffix, String anArraySeparator, String anEscapeChars, char anEscapeSymbol)