Here you can find the source of zipToMap(String[] searchStrings, String[] replacements)
private static Map<String, String> zipToMap(String[] searchStrings, String[] replacements)
//package com.java2s; //License from project: Open Source License import java.util.HashMap; import java.util.Map; public class Main { private static Map<String, String> zipToMap(String[] searchStrings, String[] replacements) { Map<String, String> map = new HashMap<>(); for (int i = 0; i < searchStrings.length; ++i) { map.put(searchStrings[i], replacements[i]); }//from w w w . j a v a 2 s .c o m return map; } }