The purpose of this post is to take a look on lambda expressions introduced in Java SE 8 and using them in service layer making code more concise and sophisticated as well. The focus is put on services implementation. The CarService is introduced here as an example. Emphasis is put on Java8 lambda expressions, java.util.function package, especially on Predicate and Function. New features is a must in Java world. The possibilities do not bring new values in programming languages in general. They are already known from other languages. However, Java is a really general purpose programming language and it always takes time to introduce new features and ensuring production-ready platform. This post is code oriented. The most significant code snippets are provided throughout the content whereas the complete sources can be found on softexploration github.
Employing Java 8 in service layer
Leave a reply