package task2;

import java.text.MessageFormat;
import java.util.Map;
import java.util.Map.Entry;

public class MapUtil {
	
	/**
	 *        {{key : x, value : y}, {key : x, value : y}, ...}
	 * @param m  
	 * @return   
	 */
	public static String toString(Map<? extends Object, ? extends Object> m) {
		StringBuffer sb = new StringBuffer();
		if (m != null) {
			sb.append("{");
			int i = 1;
			for (Entry<? extends Object, ? extends Object> entry : m.entrySet()) {
				Object key = entry.getKey();
				Object value = entry.getValue();
				sb.append(
					MessageFormat.format(
						"'{'key : {0}, value : {1}'}'{2}",
						key, value, (i < m.size()) ? ", " : ""
					)
				);
				i++;
			}
			sb.append("}");
		} else
			sb.append("null");
		
		return sb.toString();
	}
}
@@ -122,22 +122,73 @@
 %0A%09%0A%09
-/**%0A%09 *       
+%0A%09//%D0%9F%D1%80%D0%B5%D0%BE%D0%B1%D1%80%D0%B0%D0%B7%D1%83%D0%B5%D1%82 %D1%80%D0%B0%D1%81%D0%BF%D1%80%D0%B5%D0%B4%D0%B5%D0%BB%D0%B8%D1%82%D0%B5%D0%BB%D1%8C %D0%B2 %D0%B5%D0%B3%D0%BE %D1%81%D1%82%D1%80%D0%BE%D0%BA%D0%BE%D0%B2%D0%BE%D0%B5 %D0%BF%D1%80%D0%B5%D0%B4%D1%81%D1%82%D0%B0%D0%B2%D0%BB%D0%B5%D0%BD%D0%B8%D0%B5 %D0%B2%D0%B8%D0%B4%D0%B0
  %7B%7Bk
@@ -239,41 +239,95 @@
 .%7D%0A%09
- * @
+// 
 param
- m  %0A%09 * @return   %0A%09 */
+etrs m %D0%B8%D1%81%D0%BA%D0%BE%D0%BC%D1%8B%D0%B9 %D1%80%D0%B0%D1%81%D0%BF%D1%80%D0%B5%D0%B4%D0%B5%D0%BB%D0%B8%D1%82%D0%B5%D0%BB%D1%8C%0A%09// return %D1%81%D1%82%D1%80%D0%BE%D0%BA%D0%BE%D0%B2%D0%BE%D0%B5 %D0%BF%D1%80%D0%B5%D0%B4%D1%81%D1%82%D0%B0%D0%B2%D0%BB%D0%B5%D0%BD%D0%B8%D0%B5 %D1%80%D0%B0%D1%81%D0%BF%D1%80%D0%B5%D0%B4%D0%B5%D0%BB%D0%B8%D1%82%D0%B5%D0%BB%D1%8F
 %0A%09pu
@@ -872,8 +872,9 @@
 ();%0A%09%7D%0A%7D
+%0A

Update MapUtil.java