Java 8 in Action: Lambdas, Streams, and functional-style programming

Front Cover
Manning Publications Company, Aug 28, 2014 - Computers - 497 pages

 Every new version of Java is important, but Java 8 is a game changer. Java 8 in Action is a clearly written guide to the new features of Java 8. It begins with a practical introduction to lambdas, using real-world Java code. Next, it covers the new Streams API and shows how you can use it to make collection-based code radically easier to understand and maintain. It also explains other major Java 8 features including default methods, Optional, CompletableFuture, and the new Date and Time API.

This book is written for programmers familiar with Java and basic OO programming.

What's Inside

How to use Java 8's powerful new featuresWriting effective multicore-ready applicationsRefactoring, testing, and debuggingAdopting functional-style programmingQuizzes and quick-check questions

About the Authors

Raoul-Gabriel Urma is a software engineer, speaker, trainer, and PhD candidate at the University of Cambridge. Mario Fusco is an engineer at Red Hat and creator of the lambdaj library. Alan Mycroft is a professor at Cambridge and cofounder of the Raspberry Pi Foundation.

Table of Contents

PART 1 FUNDAMENTALSJava 8: why should you care?Passing code with behavior parameterizationLambda expressionsPART 2 FUNCTIONAL-STYLE DATA PROCESSINGIntroducing streamsWorking with streamsCollecting data with streamsParallel data processing and performancePART 3 EFFECTIVE JAVA 8 PROGRAMMINGRefactoring, testing, and debuggingDefault methods Using Optional as a better alternative to null CompletableFuture: composable asynchronousprogrammingNew Date and Time APIPART 4 BEYOND JAVA 8Thinking functionallyFunctional programming techniquesBlending OOP and FP: comparing Java 8 and Scala Conclusions and where next for JavaAPPENDIXESMiscellaneous language updatesMiscellaneous library updatesPerforming multiple operations in parallelon a streamLambdas and JVM bytecode

About the author (2014)

 Raoul-Gabriel Urma has worked as a software engineer for Oracle's Java Platform Group, Google's Python team, Ebay, and Goldman Sachs as well as for several startup projects. He's currently completing a PhD in Computer Science at the University of Cambridge and is a regular speaker and instructor.

Mario Fusco is a senior software engineer at Red Hat working on Drools, the JBoss rule engine. He created the open source library lambdaj, an internal Java DSL for manipulating collections in a functional way.

Alan Mycroft is Professor of Computer Science at the University of Cambridge, where he researches programming languages, their semantics, optimization and implementation. He is a co-founder and Trustee of the Raspberry Pi Foundation.

Bibliographic information