ISBN 9789351197430,Java 8 In Action

Java 8 In Action


Mario Fusco


Dreamtech Press



Dreamtech Press

Publication Year 2014

ISBN 9789351197430

ISBN-10 9351197433

Paper Back

Number of Pages 424 Pages
Language (English)

Medicine: general issues

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, completable future and the new date and time API.
Functional-style data processing
Effective Java 8 programming
Beyond Java Table of Contents
Part 1 Fundamentals
Chapter 1 : Java 8 - Why Should You Care?
Why is Java Still Changing?
Functions in Java
Default Methods
Other Good Ideas from Functional Programming

Chapter 2 - Passing Code with Behavior Parametrization
Coping with Changing Requirements
Behavior Parameterization
Tackling Verbosity
Real - World Examples

Chapter 3 - Lambda Expressions
Lambdas in a Nutshell
Where and How to Use Lambdas
Putting Lambdas into Practice: The Execute Around Pattern
Using Functional Interfaces
Type Checking, Type Inference and Restrictions
Method References
Putting Lambdas and Method References into Practice!
Useful Methods to Compose Lambda Expressions
Similar Ideas from Mathematics

Part 2 : Functional - Style Data Processing
Chapter 4 - Introducing Streams
What are Streams?
Getting Started with Streams
Streams Vs. Collections
Stream Operations

Chapter 5 - Working with Streams
Filtering and Slicing
Finding and Matching
Putting it All into Practice
Numeric Streams
Building Streams

Chapter 6 - Collecting Data with Streams
Collectors in a Nutshell
Reducing and Summarizing
The Collector Interface
Developing Your Own Collector for Better Performance

Chapter 7 - Parallel Data Processing and Performance
Parallel Streams
The Fork / Join Framework

Part 3 : Effective Java 8 Programming
Chapter 8 - Re factoring, Testing and Debugging
Re factoring for Improved Readability and Flexibility
Re factoring Object - Oriented Design Patterns with Lambdas
Testing Lambdas

Chapter 9 - Default Methods
Evolving APIs
Default Methods in a Nutshell
Usage Patterns for Default Methods
Resolution Rules

Chapter 10 - Using Optional as a Better Alternative to Null
How do You Model the Absence of a Value?
Introducing the Optional Class
Patterns for Adopting Optional
Practical Examples of Using Optional

Chapter 11 - Completablefuture: Composable Asynchronous Programming
Implementing an Asynchronous API
Make Your Code Non - Blocking
Pipelining Asynchronous Tasks
Reacting to a Completablefuture Completion

Chapter 12 - New Date and Time API
Localdate, Localtime, Instant, Duration and Period
Manipulating, Parsing and Formatting Dates
Working with Different Time Zones and Calendars

Part 4 - Beyond Java
Chapter 13 - Thinking Functionally
Implementing and Maintaining Systems
What’S Functional Programming?
Recursion Vs. Iteration

Chapter 14 - Functional Programming Techniques
Functions Everywhere
Persistent Data Structures
Lazy Evaluation with Streams
Pattern Matching

Chapter 15 - Blending OOP and FP: Comparing Java 8 and Scala
Introduction to Scala
Classes and Traits

Chapter 16 - Conclusions and Where Next for Java
Review of Java 8 Features
What’s Ahead for Java

More from Author