Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Arrow up icon
GO TO TOP
Learning Java Functional Programming

You're reading from   Learning Java Functional Programming Create robust and maintainable Java applications using the functional style of programming

Arrow left icon
Product type Paperback
Published in Oct 2015
Publisher
ISBN-13 9781783558483
Length 296 pages
Edition 1st Edition
Languages
Arrow right icon
Authors (2):
Arrow left icon
Richard M Reese Richard M Reese
Author Profile Icon Richard M Reese
Richard M Reese
Richard M. Reese Richard M. Reese
Author Profile Icon Richard M. Reese
Richard M. Reese
Arrow right icon
View More author details
Toc

Table of Contents (16) Chapters Close

Learning Java Functional Programming
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
1. Getting Started with Functional Programming FREE CHAPTER 2. Putting the Function in Functional Programming 3. Function Composition and Fluent Interfaces 4. Streams and the Evaluation of Expressions 5. Recursion Techniques in Java 8 6. Optional and Monads 7. Supporting Design Patterns Using Functional Programming 8. Refactoring, Debugging, and Testing 9. Bringing It All Together Index

Summary


The use of streams is considered to be one aspect of functional programming languages. In this chapter, we addressed the use of streams as supported by Java 8. We demonstrated the creation and use of finite and infinite streams. These depend on some data source, which might be bounded in length as with arrays or indefinite if derived from a source such as a network connection.

The Stream class supports the stream concept in Java. While it possesses many methods, we covered only a few with the goal of imparting a feel for the use and power of streams. We examined the filter, skip, and sorted methods and used them in several examples. We demonstrated the popular map-reduce technique, which potentially modifies a set of data and then combines these values into a result.

The concepts of lazy and eager evaluation were examined and illustrated. Lazy evaluation makes possible the use of infinite streams. You also learned that a stream execution begins when the terminal method starts and ends...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime
Visually different images