分類 | 數量 | 設計模式 | 輔助記憶 |
---|---|---|---|
建立型 | 5 | 工廠方法模式(Factory Method)、抽象工廠模式(Abstract Factory)、建造者模式(Builder)、原型模式(Prototype)、單例模式(Singleton) | 單例的建造者原型是抽象工廠的工廠方法 |
結構型 | 7 | 適配器模式(Adapter)、橋接模式(Bridge)、組合模式(Composite)、裝飾器模式(Decorator)、門面模式(Facade)、享元模式(Flyweight)、代理模式(Proxy) | 門面的代理裝飾器組合享元的橋接適配器 |
行爲型 | 11 | 解釋器模式(Interpreter)、模板方法模式(Template Method)、責任鏈模式(Chain of Responsibility)、命令模式(Command)、迭代器模式(Iterator)、調解者模式(Mediator)、備忘錄模式(Memento)、觀察者模式(Observer)、狀態模式(State)、策略模式(Strategy)、訪問者模式(Visitor) | 訪問者解釋器的備忘錄狀態命令調解者的責任鏈策略和觀察者的模板方法迭代器 |