I am a Certified Vaadin 14 Professional now
What the title says :)
If you are interrested in hiring a consultant for the effective use of open source software on an enterprise grade, take a look around in the About section to see, what I have to offer.
Various snippets or code parts I found useful, so I keep them here for reference.
What the title says :)
What the title says :)
collectEntries
in Groovy works on collections: an optionally passed
closure (otherwise identity is used) must return either tuples (two
element arrays/lists -- think key and value) or maps and it turns
that into a map. E.g.:
[[1,2],[3,4]].collectEntries() // → [1:2, 3:4] [[a: 1, b: 2],[c: 3]].collectEntries() // → [a:1, b:2, c:3] [1,2,3].collectEntries{ [it, it] } // → [1:1, 2:2, 3:3]
So this creates maps. But what map exactly? Educated guess:
LinkedHashMap
, which is also the implementation the Groovy map
literal uses. Let's check:
So what if we want another data structure? A not so well know feature (at least to me), is the possibility to pass in an existing map.
So this can be used to pick an appropriate data type:
Or to append to an existing map:
I have put together an example repo (it's my 100th, woohoo!) to show the use of Shadow-Cljs via Docker.