@Test public void propertiesToMap() { Properties properties = new Properties(); properties.put("my.key1", "my.value1"); properties.put("my.key2", "my.value2"); properties.put("my.key3", 2); Map<String, String> map = ConfigSourceUtil.propertiesToMap(properties); assertEquals("my.value1", map.get("my.key1")); assertEquals("my.value2", map.get("my.key2")); assertEquals("2", map.get("my.key3")); }
public static Map<String, String> propertiesToMap(Properties properties) { return properties.entrySet().stream().collect(Collectors.toMap(e -> String.valueOf(e.getKey()), e -> String.valueOf(e.getValue()))); }
ConfigSourceUtil { public static Map<String, String> propertiesToMap(Properties properties) { return properties.entrySet().stream().collect(Collectors.toMap(e -> String.valueOf(e.getKey()), e -> String.valueOf(e.getValue()))); } }
ConfigSourceUtil { public static Map<String, String> propertiesToMap(Properties properties) { return properties.entrySet().stream().collect(Collectors.toMap(e -> String.valueOf(e.getKey()), e -> String.valueOf(e.getValue()))); } private  ConfigSourceUtil(); }
ConfigSourceUtil { public static Map<String, String> propertiesToMap(Properties properties) { return properties.entrySet().stream().collect(Collectors.toMap(e -> String.valueOf(e.getKey()), e -> String.valueOf(e.getValue()))); } private  ConfigSourceUtil(); static Map<String, String> propertiesToMap(Properties properties); static Map<String, String> urlToMap(URL locationOfProperties); static int getOrdinalFromMap(Map<String, String> map, int defaultOrdinal); }
ConfigSourceUtil { public static Map<String, String> propertiesToMap(Properties properties) { return properties.entrySet().stream().collect(Collectors.toMap(e -> String.valueOf(e.getKey()), e -> String.valueOf(e.getValue()))); } private  ConfigSourceUtil(); static Map<String, String> propertiesToMap(Properties properties); static Map<String, String> urlToMap(URL locationOfProperties); static int getOrdinalFromMap(Map<String, String> map, int defaultOrdinal); static final String CONFIG_ORDINAL_KEY; static final String CONFIG_ORDINAL_100; }