設計模式6大設計原則解讀——接口隔離原則

上一篇我們解讀了依賴倒置原則,今天來說一下接口隔離原則。 接口隔離原則(Interface Segregation Principle) 定義: 1、客戶端不應該依賴它不需要的接口; 2、一個類對另一個類的依賴應該建立在最小的接口上。 原文定義: 1、Clients should not be forced to depend upon interfaces that they don’t use
相關文章
相關標籤/搜索