迭代器模式 - Iterator Pattern
用途 Description classDiagram classA --|> classB : Inheritance classC --* classD : Composition classE --o classF : Aggregation classG --> classH : Association classI -- classJ :...
用途 Description classDiagram classA --|> classB : Inheritance classC --* classD : Composition classE --o classF : Aggregation classG --> classH : Association classI -- classJ :...
用途 將請求封裝成一個對象,從而使您可以用不同的請求對客戶進行參數化 classDiagram Invoker o--> ICommand ConcreteCommand ..> ICommand ConcreteCommand --> Receiver Client --> Receiver namespace BaseShapes ...
用途 將對象”組合”成樹結構以表示部分-整體層次結構 classDiagram Client ..> Leaf Client ..> Composite Leaf --|> Component Composite --|> Component Composite "1" o--> "0..*" Component namesp...
用途 把事物對象和其具體行爲、具體特徵分離開來,使它們可以各自獨立的變化。 classDiagram ConcreteAbstract --|> Abstract Implementor --o Abstract ConcreteImplementor ..|> Implementor Client ..> Implementor Clien...
用途 節省記憶體和資源,並提高的效能 classDiagram ConcreteFlyweight ..|> IFlyweight UnsharedConcreteFlyweight ..|> IFlyweight Context ..> IFlyweight Context ..> Factory Factory ..> IFl...
用途 提供了一個簡化的介面,用來操作複雜的子系統 classDiagram SystemFacade ..> SubsystemA SystemFacade ..> SubsystemB ClientA ..> SystemFacade ClientB ..> SystemFacade namespace System { cl...
用途 將操作從元素的類別中分離出來,並將其封裝在訪問者類別中 在不修改元素類別的情況下,可以輕鬆地新增新的操作或訪問者 classDiagram ConcreteVisitorA ..|> IVisitor ConcreteVisitorB ..|> IVisitor ConcreteElementA ..|> Element Concre...
用途 管理相依的觀察者,在被觀察對象發生變動發出通知觀察者 classDiagram note for Client "Create and register Observers, notify all observers when you need." Client ..> IObserver Client ..> ISubject IObserve...
用途 透過改變狀態來改變行為,讓每個狀態行為獨立易於添加、修改 classDiagram ConcreteStateA ..|> IState ConcreteStateB ..|> IState IState --o Context Client ..> Context note for Client "Create context the...
用途 管理物件狀態的存取 classDiagram note for Client "Originator modify content save to Memento\n MementoManager manage Memento" MementoManager --> Memento Originator --> Memento Client --...