Skip to content

Commit

Permalink
Merge pull request ascoders#281 from giscafer/patch-1
Browse files Browse the repository at this point in the history
fix: typo
  • Loading branch information
ascoders authored Nov 18, 2020
2 parents 9ae28c5 + f3222c6 commit 2052627
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion 172.精读《设计模式 - Adapter 适配器模式》.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ class Adapter implements ITarget {

## 总结

适配器模式也复合开闭原则,在不对原有对象改造的前提下,构造一个适配器就能完成模块衔接。
适配器模式也符合开闭原则,在不对原有对象改造的前提下,构造一个适配器就能完成模块衔接。

适配器模式的实现分为类与对象模式,类模式用继承,对象模式用组合,分别适用于 `Adaptee``Target` 结构相似与结构差异较大的场景,在任何情况下,组合模式都是灵活性最高的。

Expand Down

0 comments on commit 2052627

Please sign in to comment.