@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
}
`` `