Here you can find the source of loadStringDoubleMap(Scanner scanner)
public static HashMap<String, double[]> loadStringDoubleMap(Scanner scanner)
//package com.java2s; //License from project: Open Source License import java.util.HashMap; import java.util.Scanner; public class Main { public static HashMap<String, double[]> loadStringDoubleMap(Scanner scanner) { HashMap<String, double[]> ret = new HashMap<String, double[]>(); int dimX = scanner.nextInt(); int dimY = scanner.nextInt(); scanner.nextLine();//from w w w. ja v a 2s. c o m for (int i = 0; i < dimX; i++) { String word = scanner.nextLine(); double[] vals = new double[dimY]; for (int j = 0; j < dimY; j++) { vals[j] = scanner.nextDouble(); } scanner.nextLine(); ret.put(word, vals); } return ret; } }