Here you can find the source of saveStringDoubleMap(Map
public static void saveStringDoubleMap(Map<String, double[]> map, int dim, PrintStream out)
//package com.java2s; //License from project: Open Source License import java.io.PrintStream; import java.util.Map; import java.util.Map.Entry; public class Main { public static void saveStringDoubleMap(Map<String, double[]> map, int dim, PrintStream out) { out.println(map.size() + " " + dim); for (Entry<String, double[]> entry : map.entrySet()) { out.println(entry.getKey()); for (int i = 0; i < dim; i++) { out.print(entry.getValue()[i]); if (i != dim - 1) { out.print(" "); }/*from w w w . j av a 2 s . c om*/ } out.println(); } } }