Top "Map" questions

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

Groovy map method of collections

Is there a map method in Groovy? I want to do something like I do with the following Scala snippet: …

scala groovy functional-programming map
Using pair<int, int> as key for map

Based on a previous question, I am trying to create a map using a pair of integers as a key …

c++ map std-pair
How to correctly use HashMap?

HashMap savedStuff = new HashMap(); savedStuff.put("symbol", this.symbol); //this is a string savedStuff.put("index", this.index); //this is …

java data-structures map hashmap key-value
How to get the element index when mapping an array in Scala?

Let's consider a simple mapping example: val a = Array("One", "Two", "Three") val b = a.map(s => myFn(s)) …

arrays scala map scala-collections
Java invert map

I need create inverse map - select unique values and for them find keys. Seems that only way is to …

java map invert
Java Map Values to Comma Separated String

Is there an effective way to convert java map values to comma separated string using guava or StringUtils? Map<…

java csv map guava string-utils
How to create a loop through LinkedHashMap<String,ArrayList<String>>?

Please help me to create a loop through LinkedHashMap<String,ArrayList<String>> h: if (h.get("…

java loops map linkedhashmap
Wifi Triangulation

What would be the best way to triangulate a wireless network passively. Are there tools available? Algorithms? Libraries? My goal …

map mapping wireless wifi triangulation
How to trigger events on Leaflet map polygons?

I'm trying to figure out how to manually trigger events for Leaflet polygons (loaded via GeoJSON). In a nutshell, I …

events map geojson leaflet
Confused with the for-comprehension to flatMap/Map transformation

I really don't seem to be understanding Map and FlatMap. What I am failing to understand is how a for-comprehension …

scala map monads for-comprehension