Here you can find the source of hashMapRange(int upTo)
public static HashMap<String, String> hashMapRange(int upTo)
//package com.java2s; //License from project: Open Source License import java.util.HashMap; public class Main { public static HashMap<String, String> hashMapRange(int upTo) { HashMap<String, String> h = new HashMap<>(upTo); for (int i = 0; i < upTo; i++) { h.put("k" + i, "v" + i); }/* w w w .j a v a2 s . co m*/ return h; } }