この文書の現在のバージョンと選択したバージョンの差分を表示します。
両方とも前のリビジョン 前のリビジョン | |||
dokuwikiマニュアル [2019/08/24 14:44] ips |
dokuwikiマニュアル [2019/08/24 15:31] (現在) ips |
||
---|---|---|---|
ライン 144: | ライン 144: | ||
TODO枠 | TODO枠 | ||
</WRAP> | </WRAP> | ||
+ | |||
+ | ===== UML ===== | ||
+ | |||
+ | <HTML> | ||
+ | <uml> | ||
+ | title Iterator | ||
+ | |||
+ | interface Aggregate{ | ||
+ | createIterator() | ||
+ | } | ||
+ | |||
+ | interface Iterator{ | ||
+ | +hasNext() | ||
+ | +next() | ||
+ | } | ||
+ | |||
+ | class BookShelf{ | ||
+ | createIterator(this) | ||
+ | } | ||
+ | |||
+ | class BookShelfIterator{ | ||
+ | BookShelf | ||
+ | +hasNext() | ||
+ | +next() | ||
+ | } | ||
+ | |||
+ | Aggregate -> Iterator : Create | ||
+ | Aggregate <|.. BookShelf | ||
+ | Iterator <|.. BookShelfIterator | ||
+ | BookShelf <-o BookShelfIterator | ||
+ | |||
+ | </uml> | ||
+ | </HTML> | ||
+ | |||
+ | <uml> | ||
+ | title Iterator | ||
+ | |||
+ | interface Aggregate{ | ||
+ | createIterator() | ||
+ | } | ||
+ | |||
+ | interface Iterator{ | ||
+ | +hasNext() | ||
+ | +next() | ||
+ | } | ||
+ | |||
+ | class BookShelf{ | ||
+ | createIterator(this) | ||
+ | } | ||
+ | |||
+ | class BookShelfIterator{ | ||
+ | BookShelf | ||
+ | +hasNext() | ||
+ | +next() | ||
+ | } | ||
+ | |||
+ | Aggregate -> Iterator : Create | ||
+ | Aggregate <|.. BookShelf | ||
+ | Iterator <|.. BookShelfIterator | ||
+ | BookShelf <-o BookShelfIterator | ||
+ | |||
+ | </uml> |