From 8b49ea44686bc84082251e72c47d9a790764454e Mon Sep 17 00:00:00 2001 From: edidada Date: Mon, 16 Sep 2019 11:29:46 +0800 Subject: [PATCH 01/10] add some --- pom.xml | 4 ++-- src/main/java/lambdasinaction/chap1/FilteringApples.java | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/pom.xml b/pom.xml index 10e5035e..729668c9 100644 --- a/pom.xml +++ b/pom.xml @@ -37,8 +37,8 @@ maven-compiler-plugin 3.1 - 1.9 - 1.9 + 11 + 11 diff --git a/src/main/java/lambdasinaction/chap1/FilteringApples.java b/src/main/java/lambdasinaction/chap1/FilteringApples.java index 51afc8cb..45fbbaf0 100644 --- a/src/main/java/lambdasinaction/chap1/FilteringApples.java +++ b/src/main/java/lambdasinaction/chap1/FilteringApples.java @@ -1,6 +1,8 @@ package lambdasinaction.chap1; -import java.util.*; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; import java.util.function.Predicate; public class FilteringApples{ @@ -96,6 +98,7 @@ public void setColor(String color) { this.color = color; } + @Override public String toString() { return "Apple{" + "color='" + color + '\'' + From d8713a20f7d1b16aa71fec8c7ce41a98dfc5bee6 Mon Sep 17 00:00:00 2001 From: edidada Date: Mon, 16 Sep 2019 13:53:12 +0800 Subject: [PATCH 02/10] add some --- README.md | 61 ++++------------------------------------------------ README_my.md | 59 ++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 63 insertions(+), 57 deletions(-) create mode 100644 README_my.md diff --git a/README.md b/README.md index 9ee848d5..f5fa67eb 100644 --- a/README.md +++ b/README.md @@ -1,59 +1,6 @@ -Java8InAction -=============== +# README -This repository contains all the source code for the examples and quizzes in the book Java 8 in Action: Lambdas, Streams and functional-style programming. +jdk必须是11 -You can purchase the book here: [http://manning.com/urma/](http://manning.com/urma/) or on Amazon - -The source code for all examples can be found in the directory [src/main/java/lambdasinaction](https://github.com/java8/Java8InAction/tree/master/src/main/java/lambdasinaction) - -* Chapter 1: Java 8: why should you care? -* Chapter 2: Passing code with behavior parameterization -* Chapter 3: Lambda expressions -* Chapter 4: Working with Streams -* Chapter 5: Processing data with streams -* Chapter 6: Collecting data with streams -* Chapter 7: Parallel data processing and performance -* Chapter 8: Refactoring, testing, debugging -* Chapter 9: Default methods -* Chapter 10: Using Optional as a better alternative to null -* Chapter 11: CompletableFuture: composable asynchronous programming -* Chapter 12: New Date and Time API -* Chapter 13: Thinking functionally -* Chapter 14: Functional programming techniques -* Chapter 15: Blending OOP and FP: comparing Java 8 and Scala -* Chapter 16: Conclusions and "where next" for Java -* Appendix A: Miscellaneous language updates -* Appendix B: Miscellaneous library updates -* Appendix C: Performing multiple operations in parallel on a Stream -* Appendix D: Lambdas and JVM bytecode -We will update the repository as we update the book. Stay tuned! - -### Make sure to have JDK8 installed -The latest binary can be found here: http://www.oracle.com/technetwork/java/javase/overview/java8-2100321.html - -$ java -version - -java version "1.8.0_05" -Java(TM) SE Runtime Environment (build 1.8.0_05-b13) -Java HotSpot(TM) 64-Bit Server VM (build 25.5-b02, mixed mode) - - -You can download a preview version here: https://jdk8.java.net/ - -### Compile/Run the examples -Using maven: - -$ mvn compile - -$ cd target/classes - -$ java lambdasinaction/chap1/FilteringApples - - -Alternatively you can compile the files manually inside the directory src/main/java - -You can also import the project in your favorite IDE: - * In IntelliJ use "File->Open" menu and navigate to the folder where the project resides - * In Eclipse use "File->Import->Existing Maven Projects" (also modify "Reduntant super interfaces" to report as Warnings instead of Errors - * In Netbeans use "File->Open Project" menu \ No newline at end of file +tools.jar 没了 +模块化 diff --git a/README_my.md b/README_my.md new file mode 100644 index 00000000..9ee848d5 --- /dev/null +++ b/README_my.md @@ -0,0 +1,59 @@ +Java8InAction +=============== + +This repository contains all the source code for the examples and quizzes in the book Java 8 in Action: Lambdas, Streams and functional-style programming. + +You can purchase the book here: [http://manning.com/urma/](http://manning.com/urma/) or on Amazon + +The source code for all examples can be found in the directory [src/main/java/lambdasinaction](https://github.com/java8/Java8InAction/tree/master/src/main/java/lambdasinaction) + +* Chapter 1: Java 8: why should you care? +* Chapter 2: Passing code with behavior parameterization +* Chapter 3: Lambda expressions +* Chapter 4: Working with Streams +* Chapter 5: Processing data with streams +* Chapter 6: Collecting data with streams +* Chapter 7: Parallel data processing and performance +* Chapter 8: Refactoring, testing, debugging +* Chapter 9: Default methods +* Chapter 10: Using Optional as a better alternative to null +* Chapter 11: CompletableFuture: composable asynchronous programming +* Chapter 12: New Date and Time API +* Chapter 13: Thinking functionally +* Chapter 14: Functional programming techniques +* Chapter 15: Blending OOP and FP: comparing Java 8 and Scala +* Chapter 16: Conclusions and "where next" for Java +* Appendix A: Miscellaneous language updates +* Appendix B: Miscellaneous library updates +* Appendix C: Performing multiple operations in parallel on a Stream +* Appendix D: Lambdas and JVM bytecode +We will update the repository as we update the book. Stay tuned! + +### Make sure to have JDK8 installed +The latest binary can be found here: http://www.oracle.com/technetwork/java/javase/overview/java8-2100321.html + +$ java -version + +java version "1.8.0_05" +Java(TM) SE Runtime Environment (build 1.8.0_05-b13) +Java HotSpot(TM) 64-Bit Server VM (build 25.5-b02, mixed mode) + + +You can download a preview version here: https://jdk8.java.net/ + +### Compile/Run the examples +Using maven: + +$ mvn compile + +$ cd target/classes + +$ java lambdasinaction/chap1/FilteringApples + + +Alternatively you can compile the files manually inside the directory src/main/java + +You can also import the project in your favorite IDE: + * In IntelliJ use "File->Open" menu and navigate to the folder where the project resides + * In Eclipse use "File->Import->Existing Maven Projects" (also modify "Reduntant super interfaces" to report as Warnings instead of Errors + * In Netbeans use "File->Open Project" menu \ No newline at end of file From 24c7653cbb8c0a314c3c972298b67134c47714bb Mon Sep 17 00:00:00 2001 From: edidada Date: Tue, 17 Sep 2019 00:03:49 +0800 Subject: [PATCH 03/10] add chap 1 --- README_my.md | 62 ++----------------- .../chap1/FilteringApples.java | 3 +- 2 files changed, 6 insertions(+), 59 deletions(-) diff --git a/README_my.md b/README_my.md index 9ee848d5..a8fa0930 100644 --- a/README_my.md +++ b/README_my.md @@ -1,59 +1,5 @@ -Java8InAction -=============== +# README -This repository contains all the source code for the examples and quizzes in the book Java 8 in Action: Lambdas, Streams and functional-style programming. - -You can purchase the book here: [http://manning.com/urma/](http://manning.com/urma/) or on Amazon - -The source code for all examples can be found in the directory [src/main/java/lambdasinaction](https://github.com/java8/Java8InAction/tree/master/src/main/java/lambdasinaction) - -* Chapter 1: Java 8: why should you care? -* Chapter 2: Passing code with behavior parameterization -* Chapter 3: Lambda expressions -* Chapter 4: Working with Streams -* Chapter 5: Processing data with streams -* Chapter 6: Collecting data with streams -* Chapter 7: Parallel data processing and performance -* Chapter 8: Refactoring, testing, debugging -* Chapter 9: Default methods -* Chapter 10: Using Optional as a better alternative to null -* Chapter 11: CompletableFuture: composable asynchronous programming -* Chapter 12: New Date and Time API -* Chapter 13: Thinking functionally -* Chapter 14: Functional programming techniques -* Chapter 15: Blending OOP and FP: comparing Java 8 and Scala -* Chapter 16: Conclusions and "where next" for Java -* Appendix A: Miscellaneous language updates -* Appendix B: Miscellaneous library updates -* Appendix C: Performing multiple operations in parallel on a Stream -* Appendix D: Lambdas and JVM bytecode -We will update the repository as we update the book. Stay tuned! - -### Make sure to have JDK8 installed -The latest binary can be found here: http://www.oracle.com/technetwork/java/javase/overview/java8-2100321.html - -$ java -version - -java version "1.8.0_05" -Java(TM) SE Runtime Environment (build 1.8.0_05-b13) -Java HotSpot(TM) 64-Bit Server VM (build 25.5-b02, mixed mode) - - -You can download a preview version here: https://jdk8.java.net/ - -### Compile/Run the examples -Using maven: - -$ mvn compile - -$ cd target/classes - -$ java lambdasinaction/chap1/FilteringApples - - -Alternatively you can compile the files manually inside the directory src/main/java - -You can also import the project in your favorite IDE: - * In IntelliJ use "File->Open" menu and navigate to the folder where the project resides - * In Eclipse use "File->Import->Existing Maven Projects" (also modify "Reduntant super interfaces" to report as Warnings instead of Errors - * In Netbeans use "File->Open Project" menu \ No newline at end of file +## Chap. 1 +- lambdasinaction.chap1.FilteringApples +- java.util.function.Predicate diff --git a/src/main/java/lambdasinaction/chap1/FilteringApples.java b/src/main/java/lambdasinaction/chap1/FilteringApples.java index 45fbbaf0..5e4c560d 100644 --- a/src/main/java/lambdasinaction/chap1/FilteringApples.java +++ b/src/main/java/lambdasinaction/chap1/FilteringApples.java @@ -11,7 +11,8 @@ public static void main(String ... args){ List inventory = Arrays.asList(new Apple(80,"green"), new Apple(155, "green"), - new Apple(120, "red")); + new Apple(120, "red")); + System.out.println(inventory.getClass().getName());//java.util.Arrays$ArrayList // [Apple{color='green', weight=80}, Apple{color='green', weight=155}] List greenApples = filterApples(inventory, FilteringApples::isGreenApple); From 21c2dbcad50fe9310c8fcb63272fa95498e7a4d4 Mon Sep 17 00:00:00 2001 From: edidada Date: Thu, 10 Oct 2019 16:55:54 +0800 Subject: [PATCH 04/10] add some --- src/main/java/lambdasinaction/chap2/FilteringApples.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/main/java/lambdasinaction/chap2/FilteringApples.java b/src/main/java/lambdasinaction/chap2/FilteringApples.java index 0f61fd08..c4dd542f 100644 --- a/src/main/java/lambdasinaction/chap2/FilteringApples.java +++ b/src/main/java/lambdasinaction/chap2/FilteringApples.java @@ -1,12 +1,15 @@ package lambdasinaction.chap2; -import java.util.*; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; public class FilteringApples{ public static void main(String ... args){ - List inventory = Arrays.asList(new Apple(80,"green"), new Apple(155, "green"), new Apple(120, "red")); + List inventory = Arrays.asList(new Apple(80,"green"), new Apple(155, "green"), new Apple(120, "red")); // [Apple{color='green', weight=80}, Apple{color='green', weight=155}] List greenApples = filterApplesByColor(inventory, "green"); From 75145c27fc14dd78f1105730e5e3a0924cebfe9b Mon Sep 17 00:00:00 2001 From: edidada Date: Mon, 14 Oct 2019 20:21:36 +0800 Subject: [PATCH 05/10] add chap 1 --- README_my.md | 2 ++ Spliterator.png | Bin 0 -> 7821 bytes 2 files changed, 2 insertions(+) create mode 100644 Spliterator.png diff --git a/README_my.md b/README_my.md index a8fa0930..23c6fc75 100644 --- a/README_my.md +++ b/README_my.md @@ -3,3 +3,5 @@ ## Chap. 1 - lambdasinaction.chap1.FilteringApples - java.util.function.Predicate +- java.util.Spliterator +- diff --git a/Spliterator.png b/Spliterator.png new file mode 100644 index 0000000000000000000000000000000000000000..46f5e343839e7809e20859e27cab8f21a1286b4a GIT binary patch literal 7821 zcmaJ`c{tSF+aIaNPKaihi0qUt8T*rMBD;nx*#;w{7`q`95sjJ3ogCqw`MzFT_Q*KY-mETtdDgP}p>ovdMNh0xl@|7%)A7V_HDvU2;s{f}E$85Y*dPr?zv9g||)Xld} zLh#ME>oddY-%~R(@@HM_5&r7N50Heas{H(bynPkpolezpecl!s4>OC2vkt&ND1Wu6 zCJ69%bCh9?`ey@TA{>9Wf4H6eMj2+Jwxi?VmPVt)!?JY`L#9&_`v16e8b}v`lKHzM zH93HpPdbkoARTqG8@yQ5pvGtQTQqqY@{GwfC=MN z1nLScK>uNgOt)DS>Jb(TAd>D2ya1L2F)!&)yG#FK995UTkck}l!S!=EC zTTkP*kqoWqz*>vl7IeX?ah>yXZ=dtJW(*~PSl*bPcnRZ|I5S;wA$26)}^-&@6#nT_e9` zvOml&wfmiGB`Wb&{rAExp#y1vH->r+1nzAQjhZ)Gew=qmyTys(t;H+>nZMqKy!YB; z(EIg_*n7v<NYhtyxFRbVf%g@e22vFd-zA+Mc)fSe3s~l_JQCjf zbt}9!JoT!rjgA7YcoQ@ocK+S_8Lc_p)z3rA$;R^bu{u>;i|T8N+zC!`Jusy4R--zM z(6(xKw<>eNz;SQ)PV&^Ht!@3PKNSURw!AYIIGXgsd^8@sv3tr5`C1y5V|Hkp9q(y@ zv@}Z(zG9|s%LaI?OT7rg&0T|&8B0WI4>fLD@r$jmM;YxPhrgCN!tB3ixn@m+5{HJF~U2G8`J>xWF%U zBky2p#2wNZ079Tt6KPG*)GXhw^(x<*oJlquTgA_LL-W19Yo|!dMCujFfrrNy zt;v0=o82iu!l_*c{Q1AG_^c=(-0UJ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CH 06/10] add chap 3 4 --- src/main/java/lambdasinaction/chap3/README.md | 2 ++ src/main/java/lambdasinaction/chap4/README.md | 11 +++++++++++ 2 files changed, 13 insertions(+) create mode 100644 src/main/java/lambdasinaction/chap3/README.md create mode 100644 src/main/java/lambdasinaction/chap4/README.md diff --git a/src/main/java/lambdasinaction/chap3/README.md b/src/main/java/lambdasinaction/chap3/README.md new file mode 100644 index 00000000..5bafbc58 --- /dev/null +++ b/src/main/java/lambdasinaction/chap3/README.md @@ -0,0 +1,2 @@ +# +自定义接口作为参数 diff --git a/src/main/java/lambdasinaction/chap4/README.md b/src/main/java/lambdasinaction/chap4/README.md new file mode 100644 index 00000000..ce2b258c --- /dev/null +++ b/src/main/java/lambdasinaction/chap4/README.md @@ -0,0 +1,11 @@ +# + +List to Stream + +Stream的操作 +filter +sort +collect +map +forEach + From 1075b363cdf55bc41c0a2de08c344f9918cc8c7f Mon Sep 17 00:00:00 2001 From: edidada Date: Mon, 14 Oct 2019 20:52:31 +0800 Subject: [PATCH 07/10] add chap 2 --- src/main/java/lambdasinaction/chap3/README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/java/lambdasinaction/chap3/README.md b/src/main/java/lambdasinaction/chap3/README.md index 5bafbc58..fc15991e 100644 --- a/src/main/java/lambdasinaction/chap3/README.md +++ b/src/main/java/lambdasinaction/chap3/README.md @@ -1,2 +1,6 @@ # + 自定义接口作为参数 + +Comsumer +Functions From 7a95a98069e8466d75f6479f9d0052882f5bdbb3 Mon Sep 17 00:00:00 2001 From: edidada Date: Mon, 27 Mar 2023 22:59:50 +0800 Subject: [PATCH 08/10] add --- README_my.md | 3 +++ imgs/Predicate.png | Bin 0 -> 2838 bytes Spliterator.png => imgs/Spliterator.png | Bin 3 files changed, 3 insertions(+) create mode 100644 imgs/Predicate.png rename Spliterator.png => imgs/Spliterator.png (100%) diff --git a/README_my.md b/README_my.md index 23c6fc75..f6ab100d 100644 --- a/README_my.md +++ b/README_my.md @@ -5,3 +5,6 @@ - java.util.function.Predicate - java.util.Spliterator - + + +java.util.function包下面一堆接口 diff --git a/imgs/Predicate.png b/imgs/Predicate.png new file mode 100644 index 0000000000000000000000000000000000000000..18ddd49def822f3d23bdcbf1969828b6754831f4 GIT binary patch literal 2838 zcmeHJYfzJC77l_~EZ~X?a?{RKp##QixfJDM6@gxYfCRY+VO>Czegwr3)+n(cwXMd> zQsQnPKnW7bjV&ZW6GBi&SO|n+&1K0awS=gge% zJ?DAeGv_?#`|2nn&TXyFS{MxGmJok983uD0g3gt5u>6ulX3g`@Ok8Z1-{ViGOQbUA$|LpafH=6@>a(m&AjCFn>Tr=s0*dy_Tu(36TX}NDd7EA zt=3*P_xO%wWZa=Xl$VE+kv~t)bnc-#Ie!E=c*s28Iry6K-aHOF*#KReQ@Xi+quRS0 zEs1G?JE{?@9PjX9F6g&!HoRtBuVF9kIf|BaoAu66R`1Qcyyf^afuBQAZ!EfVPgwWn z_aHV)I7cX}>owKh<@kG5-4IkvxoXw6yRR8XwJ&OgjZLte)%ghEy&V5E0oCw^H$V@A z_`B_1VM844j-lS+*VNR|Xvnm*S5*^!EH?Y%qL#?u8`}v6c|6ghwu13=c$&nxY)vR` zfgef+{7GFl9n&r!n&Hv;f4U3zlHB9R-GzIjC662VJHA$({q8ROY9l{u2U^m&qnS@2 z5QzT97g~vJTlkvR9Py0Egl>vAU{}I#hSRif#nM_6^k)ffX?(XiEm!9;UtmyYoJ|76MzxzIrhIMTC-~2m$MghDWq zHHQ^j`5=d;OVD+bNThXJqs~=?EDqD+BoYbKY{kuTi{(MZnzSCYO*SB(s0vKvdZI5U&AE-8t_r-cDipNOU{vwSZ1*c0@Ul)4`$2(4e# zRmwyriqDUU<;6#<^&-=X$o*Fk8DD`Q7;T+T(Y8M1@_4w}G0{ih6MCZXkV2`%j&+U{ z?w6TwMB9%0${(nrHZwoKp~AkcYY&jMi~jsFU&^JVXc-SE$f0pgQL-B{LT~S*n9OtP z{v0>OYWw0;J%Fed2*a(-{~6sB~QTWlEuU0nK`^OdIh^sQ`9-Z z-gIieQu8%d!OeK5W3~F_)KJ`$$uU_daPVL*N<1Q4-6`ZwnQA*lreN^bAky7bC=IS3WWs>FAoF~K7l&r5C@ zJZpGKR_cYi2nLlI3D%wl)J0kU9KNRFYvh%7E5_x2 z%DkbeS|}pK;f`#WEaXM{*@IPt82BS_DPQ+Toz3>k#KSf=gzRHAbEdUfr85@@oi1Ch-eWZ=7n)0 z9>nDu)JxI!rIe7`PVw+Q+(TK)ITeS$N8c8hS~7JYF!CpaYLy1tCy-+*c~Mav^~ ziE%maR!_|2vb`|~|5Se#sf5X;Vr*Q7X(-yBrQT%82wAwUlcC_8U@9(GY&C%v%Xu*M zs=_y{@IdKv)E_PDdjmg-jHMgUzU@1OL0LjUIet9xSytcFz;tMc$-P14qxgp< zczp2oR6!`cEu3=vGjf04o%_gJ_}MXF-;H{Vj%&4AO>Tb=`f-lt-kX?u8q?aIL?LK20MwF#xKNvQ*zIZCAygIRwXI(mG0hMKR%QL4-8wB@w>~$~ndi|&p zyW*)5u6UpkZSUGwR9fx=3&fwnynVCj*R3o2n$C(&*X=jy0_cAimJo|L%=r*i{% Date: Mon, 27 Mar 2023 23:01:19 +0800 Subject: [PATCH 09/10] Create maven-publish.yml --- .github/workflows/maven-publish.yml | 34 +++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .github/workflows/maven-publish.yml diff --git a/.github/workflows/maven-publish.yml b/.github/workflows/maven-publish.yml new file mode 100644 index 00000000..dab69fef --- /dev/null +++ b/.github/workflows/maven-publish.yml @@ -0,0 +1,34 @@ +# This workflow will build a package using Maven and then publish it to GitHub packages when a release is created +# For more information see: https://github.com/actions/setup-java/blob/main/docs/advanced-usage.md#apache-maven-with-a-settings-path + +name: Maven Package + +on: + release: + types: [created] + +jobs: + build: + + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + + steps: + - uses: actions/checkout@v3 + - name: Set up JDK 11 + uses: actions/setup-java@v3 + with: + java-version: '11' + distribution: 'temurin' + server-id: github # Value of the distributionManagement/repository/id field of the pom.xml + settings-path: ${{ github.workspace }} # location for the settings.xml file + + - name: Build with Maven + run: mvn -B package --file pom.xml + + - name: Publish to GitHub Packages Apache Maven + run: mvn deploy -s $GITHUB_WORKSPACE/settings.xml + env: + GITHUB_TOKEN: ${{ github.token }} From 40b0b9c143eeac921e5713a3e374d357181df4f0 Mon Sep 17 00:00:00 2001 From: wdidada Date: Mon, 18 Aug 2025 09:38:41 +0800 Subject: [PATCH 10/10] java 11 --- pom.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pom.xml b/pom.xml index 729668c9..487b505a 100644 --- a/pom.xml +++ b/pom.xml @@ -10,6 +10,8 @@ UTF-8 + 11 + 11