Here you can find the source of toMap(Properties properties)
public static Map<Object, Object> toMap(Properties properties)
//package com.java2s; //License from project: Apache License import java.util.HashMap; import java.util.Map; import java.util.Properties; public class Main { public static Map<Object, Object> toMap(Properties properties) { Map<Object, Object> m = new HashMap<Object, Object>(); if (null != properties) { for (Object key : properties.keySet()) { m.put(key, properties.get(key)); }//from w ww.ja v a2s.c o m } return m; } }