Skip to content

Commit 4931a2e

Browse files
committed
修改
1 parent 0f543d7 commit 4931a2e

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

abstract-factory/README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,3 +91,12 @@ sailor.getDescription(); // 年轻的水手
9191
```
9292

9393
## 适用场景
94+
95+
> * 一个系统应该独立于其产品是如何创建、组合和表示的
96+
> * 一个系统需要配置多个系列中的一种产品
97+
> * 一个相关产品对象的集合被设计用于一起使用,并且需对这个集合进行约束
98+
> * 关于一个类的产品,使用者要特别关注它们的接口,而不是它们的实现
99+
> * 依赖关系的生命周期理论上比使用者的生命周期短
100+
> * 需要一个在运行时才能确定的参数来构造一个特定的依赖对象
101+
> * 需要在运行时决定从一个集合中调用哪个系列的产品
102+
> * 需要提供若干个只在运行时才知道的参数,然后才能解决依赖关系

0 commit comments

Comments
 (0)