DesignPatterns_ElementsofReusableObject-.epub
- 资料大王PDF
-
0 次阅读
-
0 次下载
-
2024-04-20 17:51:53
微信
赏
支付宝
文档简介:
Creational Patterns
Abstract Factory ( 87 ) Provide an interface for creating families of related
or dependent objects without specifying their concrete classes.
Builder ( 97 ) Separate the construction of a complex object from its
representation so that the same construction process can create different
representations.
Factory Method ( 107 ) Define an interface for creating an object, but let
subclasses decide which class to instantiate. Factory Method lets a class defer
instantiation to subclasses.
Prototype ( 117 ) Specify the kinds of objects to create using a prototypical
instance, and create new objects by copying this prototype.
Singleton ( 127 ) Ensure a class only has one instance, and provide a global
point of access to it.
Structural Patterns
Adapter ( 139 ) Convert the interface of a class into another interface clients
expect. Adapter lets classes work together that couldn’t otherwise because of
incompatible interfaces.
Bridge ( 151 ) Decouple an abstraction from its implementation so that the
two can vary independently.
Composite ( 163 ) Compose objects into tree structures to represent part-
whole hierarchies. Composi......
评论
发表评论