Advertisement

Functional Interfaces in Java

Fundamentals and Examples

  • Ralph Lecessi

Table of contents

  1. Front Matter
    Pages i-xvii
  2. Ralph Lecessi
    Pages 1-27
  3. Ralph Lecessi
    Pages 29-43
  4. Ralph Lecessi
    Pages 45-68
  5. Ralph Lecessi
    Pages 69-93
  6. Ralph Lecessi
    Pages 95-107
  7. Ralph Lecessi
    Pages 109-129
  8. Ralph Lecessi
    Pages 131-150
  9. Ralph Lecessi
    Pages 151-180
  10. Ralph Lecessi
    Pages 181-207
  11. Ralph Lecessi
    Pages 209-242
  12. Ralph Lecessi
    Pages 243-257
  13. Ralph Lecessi
    Pages 259-291
  14. Ralph Lecessi
    Pages 293-327
  15. Ralph Lecessi
    Pages 329-346
  16. Ralph Lecessi
    Pages 347-390
  17. Back Matter
    Pages 391-410

About this book

Introduction

Reduce development time by organizing your programs as chains of functional interfaces and see that the advantages of using functional interfaces include the flexibility and power of inlined functional chains and reuse of functional methods utilized throughout the Java API. You’ll see how complex logical expressions can be reduced to chains of predicates and how chains of comparators can be used to sort data by several criteria in order. Other examples include streams that utilize functional interfaces to filter, sort, transform, and perform calculations on data; CompletableFutures that use functional interfaces to create cascading and parallel execution threads; and JavaFX programs that use functional interfaces to monitor the data backed by their graphical components.

Each chapter contains a complete programming project: the Discount Dave project shows you how to qualify car customers by organizing questions as a list of predicates; the Real Estate Broker project shows you how to use chains of comparators to filter and sort homes according to customer priorities; the Dave's Part Inventory project shows you how to query and write reports from an inventory database using stream operations; and the Sentence Builder project shows you how to correct a sentence by implementing each grammar rule as a separate link in a future chain.

Functional Interfaces in Java will help you quickly develop powerful and reliable programs that utilize functional interfaces to implement logic and calculations.


You will:
  • Use the functional interfaces in the java.util.function package to perform conditional logic, transform and generate data, and perform calculations
  • Filter and sort data by several criteria  using comparators 
  • Process collections and filter, sort, transform, and reduce stream elements with functional interfaces 
  • Write cascading and parallel execution threads

Keywords

functional Java interfaces programming tech code software CS computer science source

Authors and affiliations

  • Ralph Lecessi
    • 1
  1. 1.Kendall ParkUSA

Bibliographic information

Industry Sectors
Finance, Business & Banking
Electronics
IT & Software
Telecommunications
Energy, Utilities & Environment
Aerospace