I needed a function to sum (and therefor group) the values of a map of objects to Integers. My first solution was something like As you can see, i use the collect method with a custom supplier, accumulator and combiner. The supplier prepares a new map, the accumulator takes the map and an entry and […]
This is cool: Map.Entry#comparingByKey and Map.Entry#comparingByValue. They both take another comparator or lambda that is used as a delegate for creating a Map.Entry comparator, that can be used to sort maps or find maximum and minimum pairs in a map by key or value like in the following example: import java.time.LocalDate; import java.util.Map; import java.util.Random; […]
This is the fourth Post in my series Developing a web application with Spring Boot, AngularJS and Java 8. I’m more a backend and database guy than a frontend developer, but i know how to write valid HTML and add some unobtrusive JavaScript to it, for example in my daily photo project. Daily Fratze is […]
This is the third Post in my series Developing a web application with Spring Boot, AngularJS and Java 8. My old application had a J2ME(!) companion on my dump phone that send my location to the app, showing it on the page. This was 2009… Before my iPhone time. Planning a longer bike tour in […]
And if you’re feeling You’ve got everything you came for If you got everything And you don’t want no more You’ve got to just Keep on pushing Keep on pushing Push the sky away “Push The Sky Away” by Nick Cave & The Bad Seeds. This is gonna be a lengthy post about always learning […]