O'Reilly logo

Learning Java Functional Programming by Richard M Reese

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Summary

We examined how the functional programming features of Java can simplify the implementation of object-oriented design patterns. Lambda expressions were used as an alternate means of expression functionality. Streams allowed us to combine operations. Functional interfaces and default methods allowed us to reduce the amount of coding required to implement a solution. However, functional interfaces can limit how problems can be addressed since it supports a single abstract method.

We looked specifically at the execute-around-method, factory, command, strategy, visitor, and visitor patterns. Each of these patterns is designed to address a specific problem. An object-oriented approach was presented and then followed up with a functional solution. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required