Skip to content

Latest commit

 

History

History
28 lines (26 loc) · 470 Bytes

File metadata and controls

28 lines (26 loc) · 470 Bytes

Iterator

https://refactoring.guru/ja/design-patterns/iterator

classDiagram
  class Iterator {
    <<interface>>
    hasNext()
    next()
  }
  class Aggregate {
    <<interface>>
    iterator()
  }
  class ConcreteIterator {
    aggregate
    hasNext()
    next()
  }
  class ConcreteAggregate {
    iterator()
  }
  Aggregate --> Iterator
  ConcreteAggregate ..|> Aggregate
  ConcreteIterator ..|> Iterator
  ConcreteIterator o--> ConcreteAggregate
Loading