Top "Map" questions

A dictionary maps keys to values allowing efficient retrieval of values by keys.

List<Map<String,Object>> to org.json.JSONObject?

List<Map<String, Object>> list = new ArrayList<Map<String, Object>>(); Map<…

java json javabeans map
Best way to merge two maps and sum the values of same key?

val map1 = Map(1 -> 9 , 2 -> 20) val map2 = Map(1 -> 100, 3 -> 300) I want to merge them, and …

scala map merge
How can I delete elements of a std::map with an iterator?

I would like to loop through an std::map and delete items based on their contents. How best would this …

c++ map iterator stdmap
Convert List of tuple to map (and deal with duplicate key ?)

I was thinking about a nice way to convert a List of tuple with duplicate key [("a","b"),("c","d"),("…

scala map
How to count items in a Go map?

If I want to count the items in the map structure, what statement should I use? I tried to use …

map go
Using char* as a key in std::map

I am trying to figure out why the following code is not working, and I am assuming it is an …

c++ map stdmap
Using pair as key in a map (C++ / STL)

I want to use a pair from STL as a key of a map. #include <iostream> #include <…

c++ stl map std-pair
Java : Iteration through a HashMap, which is more efficient?

Given the following code, with two alternative ways to iterate through it, is there any performance difference between these two …

java map performance hashmap iteration
How to map values in a map in Java 8?

Say I have a Map<String, Integer>. Is there an easy way to get a Map<String, …

java map lambda java-8