All posts in 'Java'

Java 8: Sort or find maximum, minimum entries in maps

05-May-14

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; […]

Read the complete article »

Spring Boot as a backend for AngularJS

15-Apr-14

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 […]

Read the complete article »

Messaging and Websockets with Spring 4

21-Mar-14

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 […]

Read the complete article »

On my way to Java 8

12-Feb-14

This is a post where i want to collect some new expressions i’m learning on my way to Java 8. Hopefully i’ll keep updating it… Use an IntStream to generate an Array with constant default values // The "() -> 23" is a lambda that matches the functional interface of a Supplier // The the […]

Read the complete article »