Chapter 7. Supporting Design Patterns Using Functional Programming

In this chapter, we will examine several design patterns and their possible implementations. Under each design pattern, we will begin with a short discussion of the pattern and follow it with an imperative solution and a functional solution. This will highlight the differences between the two approaches and provide the reader with additional experience implementing functional solutions in Java. The intent of this chapter is not necessarily to provide a detailed explanation or justification for each pattern, but rather to illustrate how these patterns can be supported in Java 8.

The general approach is to identify a problem and then apply a design pattern against it. However, this ...

Get Learning Java Functional Programming now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.