Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
复合设计模板是否遵循实体原则?如果在组件上声明了所有合成方法,则它违反了接口隔离原则。如果在复合时声明了合成方法,则它违反了 Liskov 替换原则 - 因为我们在叶子和复合时改变了行为者。我错了吗?