Cursor1 [디자인패턴] Iterator pattern (반복자 패턴) Purpose of Iterator Pattern (반복자 패턴의 목적) aka) Cursor - Allows for access to the elements of an aggregate object without allowing access to its underlying representation. - 외부에 노출 없이, 자료형 관계없이, collection에서 객체를 꺼낼 때 사용 Design Principle (디자인원칙) - Single Responsibility Principle (단일 책임의 원칙) - A class should have only one reason to change * Aggregate and Iteration – two different responsibilities * .. 2022. 8. 28. 이전 1 다음