Iterator 模式的 UML 架構圖試做

@ChrisWei 兄請參考(純參考,不用改筆記),謝謝!

classDiagram
    ConcreteIterator <|-- Iterator
    Container <|-- Iterator
    ConcreteContainer <|-- Iterator
    Iterator: +next()
    Iterator: + hasNext()
    class ConcreteIterator{
      +next():Object
      + hasNext():bool
    }
    class Container{
      +ConcreteIterator():Iterator
    }
    class ConcreteContainer{
      +ConcreteIterator():Iterator
    }
```mermaid height=280
classDiagram
    ConcreteIterator <|-- Iterator
    Container <|-- Iterator
    ConcreteContainer <|-- Iterator
    Iterator: +next()
    Iterator: + hasNext()
    class ConcreteIterator{
      +next():Object
      + hasNext():bool
    }
    class Container{
      +ConcreteIterator():Iterator
    }
    class ConcreteContainer{
      +ConcreteIterator():Iterator
    }
`` `
1個讚

原來論壇已經能支援 mermaid 了,既然有支援了,這當然得響應,趕快導入啊~
P.S. 剛剛在 Interpreter Pattern 筆記有 測試過 mermaid,只有一個字,讚~

1個讚