Here you can find the source of toString(Map, ?> attributes)
Parameter | Description |
---|---|
attributes | a parameter |
public static String toString(Map<?, ?> attributes)
//package com.java2s; //License from project: Apache License import java.util.Map; public class Main { /**/*from w ww . java 2 s . c o m*/ * @param attributes * @return String */ public static String toString(Map<?, ?> attributes) { StringBuilder buffer = new StringBuilder(); if (attributes != null && attributes.size() > 0) { for (Map.Entry<?, ?> entrySet : attributes.entrySet()) { buffer.append(entrySet.getKey()); buffer.append("=\""); buffer.append(entrySet.getValue().toString()); buffer.append("\""); buffer.append(" "); } if (buffer.length() > 0) { buffer.deleteCharAt(buffer.length() - 1); } } return buffer.toString(); } }