# Java8FunctionalProgramming **Repository Path**: sky_kia/Java8FunctionalProgramming ## Basic Information - **Project Name**: Java8FunctionalProgramming - **Description**: Java8函数式编程学习心得 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2021-03-25 - **Last Updated**: 2021-03-26 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README #<> @author : richard warburton @modifier : sky_wu [吴世凯] #### 为什么要改编人家的代码? - 外国人的思维和背景和中国不一样; so, 进行本地化是很必要的; - 纸上得来终觉浅, 绝知此事要躬行; talk is cheap , show me the code ; # 代码约定 由于 lambda 表达式 比较隐晦, 对 接口了解不深可能需要解释一番; 隐晦的方法我会在 地下 重新命名一个 原方法名_a 的 分析方法; # 书上重要内容 Java中重要的函数接口 ```text 接口 参数 返回类型 示例 Predicate T boolean 这张唱片已经发行了吗? Consumer T void 输出一个值 Function T R 获得Artist对象的名字 Supplier None T 工厂方法 UnaryOperator T T 逻辑非 (!) BinaryOperator (T, T) T 求两个数的乘积 (*) ``` #### 思考 使用函数式接口 , 其实就是给函数 '赋值'; 只不过我们赋予 函数的值 是具体的操作; java-8-lambdas-exercises ======================== This git repository contains support material for the [Java 8 Lambdas](https://www.oreilly.com/library/view/java-8-lambdas/9781449370831/) book. Project Structure ----------------- The overall code layout is: * Code is in `src/main/java` * Tests are in `src/test/java` Within these directories things are organised by package: * Exercises which involve code in `com.insightfullogic.java8.exercises` * Answers are in `com.insightfullogic.java8.answers` Coding questions are all in the form of failing tests, and the package-info.java contains the correct answer to questions which don't involve writing code, such as yes/no questions. For example here are the chapter 2 answers: https://github.com/RichardWarburton/java-8-lambdas-exercises/blob/master/src/main/java/com/insightfullogic/java8/answers/chapter2/package-info.java * Code Examples/Listings are in `com.insightfullogic.java8.examples` The sub-packages then correspond to the chapter number, so the examples for chapter 4 are in `com.insightfullogic.java8.examples.chapter4`. Reporting Issues ---------------- If you find any issues with the exercises or examples then please submit them via the [O'Reilly Errata Page](http://www.oreilly.com/catalog/errata.csp?isbn=0636920030713).