Skip to content

Commit 95319c6

Browse files
committed
增加新示例
1 parent 2819d8d commit 95319c6

File tree

15 files changed

+595
-35
lines changed

15 files changed

+595
-35
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ target
1414
.factorypath
1515
.asciidoctor/
1616
*.ttf
17+
*.otf
18+
/cfg/gems
1719
fonts.ttf.tgz
1820

1921
*.icloud
22+
23+

cfg/fonts/download-fonts.sh

Lines changed: 0 additions & 12 deletions
This file was deleted.

cfg/gems/.gitkeep

Whitespace-only changes.

cfg/theme/Source-theme.yml

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,21 @@ font:
22
catalog:
33
merge: true
44
Source Han Serif SC:
5-
normal: SourceHanSerifSC-Regular.ttf
6-
bold: SourceHanSerifSC-Bold.ttf
7-
italic: SourceHanSerifSC-Medium.ttf
8-
bold_italic: SourceHanSerifSC-SemiBold.ttf
5+
normal: SourceHanSerifSC-Regular.otf
6+
bold: SourceHanSerifSC-Bold.otf
7+
italic: SourceHanSerifSC-Medium.otf
8+
bold_italic: SourceHanSerifSC-SemiBold.otf
99
#SourceHanSerifSC-Heavy.otf
1010
#SourceHanSerifSC-ExtraLight.otf
1111
#SourceHanSerifSC-Light.otf
1212
Source Code Pro:
13-
normal: SourceCodePro-Regular.ttf
14-
bold: SourceCodePro-Semibold.ttf
15-
italic: SourceCodePro-It.ttf
16-
bold_italic: SourceCodePro-BoldIt.ttf
17-
Emoji: Symbola.ttf
13+
normal: SourceCodePro-Regular.otf
14+
bold: SourceCodePro-Semibold.otf
15+
italic: SourceCodePro-It.otf
16+
bold_italic: SourceCodePro-BoldIt.otf
17+
# Emoji: NotoColorEmoji.ttf
18+
Emoji: NotoEmoji-Regular.ttf
19+
# Emoji: Symbola.ttf
1820
#SourceCodePro-Black.ttf
1921
#SourceCodePro-BlackIt.ttf
2022
#SourceCodePro-ExtraLight.ttf

docs/diagram/ack.puml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
@startuml
2+
3+
4+
@enduml

docs/java.lang.String.adoc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,9 @@ include::{sourcedir}/StringUtils.java[]
1010
----
1111
include::{sourcedir}/StringUtilTest.java[]
1212
----
13+
14+
15+
[{java_src_attr}]
16+
----
17+
include::{sourcedir}/StringTest.java[]
18+
----

docs/java.util.Iterator.adoc

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,10 @@ ____
2626
....
2727
@startuml
2828
'skinparam nodesep 70
29+
skinparam titleFontSize 30
2930
skinparam defaultFontName Hiragino Sans GB
3031
31-
title <b>迭代器模式</b>
32+
title **迭代器模式**
3233
3334
abstract class Iterator {
3435
+ {abstract} first() :Object
@@ -64,6 +65,9 @@ Iterator <|-- ConcreteIterator
6465
ConcreteIterator -left-> ConcreteAggregate
6566
ConcreteIterator <.. ConcreteAggregate
6667
68+
skinparam footerFontSize 20
69+
footer D瓜哥 · https://www.diguage.com · 出品
70+
6771
@enduml
6872
....
6973

docs/java.util.concurrent.CompletableFuture.adoc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,13 @@ Java 中的 Promise。
99
include::{sourcedir}/concurrent/CompletableFutureTest.java[]
1010
----
1111

12+
`CompletableFuture` 实现了 `Future``CompletionStage` 两个接口。
13+
14+
`CompletionStage` 接口声明了大量方法, `thenApply*` 接受 `Function` 对象,可以实现将任务的结果转化成另外一个对象,类似 Java Stream API 中的 `map` 操作; `thenAccept` 接受 `Consumer` 对象,见文知意,就是“消费”异步任务的结果值,类似 Java Stream API 的“终止操作”。
15+
16+
17+
1218
== 参考资料
1319

1420
. https://www.baeldung.com/java-completablefuture[Guide To CompletableFuture | Baeldung]
21+
. https://xie.infoq.cn/article/12fb1f7f825bb27795679ad13[Java 8 的异步利器:CompletableFuture源码解析^]

0 commit comments

Comments
 (0)