isp
-
Interface Segregation Principle (ISP)Modeling/DesignPattern 2020. 2. 28. 11:14
1. Overview A client should not be forced to depend upon an interface that they do not use. 2. Description 2.1 Intuition 2.1.1 Interface Pollution Large Interfaces Unrelated Methods Classes have empty method implementations Method implementations throw UnsupportedOperationsException or similar Method implementations return null default/dummy values 3. Example 3.1 Violate ISP interface Persistenc..