Skip to content

Commit

Permalink
Merge pull request Snailclimb#1913 from CyrilFeng/patch-1
Browse files Browse the repository at this point in the history
错别字fix
  • Loading branch information
Snailclimb committed Feb 8, 2023
2 parents 211fc37 + eac0b52 commit 3cf54eb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/java/io/io-design-patterns.md
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ StreamDecoder(InputStream in, Object lock, CharsetDecoder dec) {

适配器和适配者两者不需要继承相同的抽象类或者实现相同的接口。

另外,`FutrueTask` 类使用了适配器模式,`Executors` 的内部类 `RunnableAdapter` 实现属于适配器,用于将 `Runnable` 适配成 `Callable`
另外,`FutureTask` 类使用了适配器模式,`Executors` 的内部类 `RunnableAdapter` 实现属于适配器,用于将 `Runnable` 适配成 `Callable`

`FutureTask`参数包含 `Runnable` 的一个构造方法:

Expand Down Expand Up @@ -316,4 +316,4 @@ class PollingWatchService

- Patterns in Java APIs:http:https://cecs.wright.edu/~tkprasad/courses/ceg860/paper/node26.html
- 装饰器模式:通过剖析 Java IO 类库源码学习装饰器模式:https://time.geekbang.org/column/article/204845
- sun.nio 包是什么,是 java 代码么? - RednaxelaFX https://www.zhihu.com/question/29237781/answer/43653953
- sun.nio 包是什么,是 java 代码么? - RednaxelaFX https://www.zhihu.com/question/29237781/answer/43653953

0 comments on commit 3cf54eb

Please sign in to comment.