
设计模式
梆梆梆梆
宁静致远
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
java设计模式—里氏置换原则(LSP)
一、定义里氏置换原则(Liskov Substitution Principle),简称LSPFunctions that use pointers or references to base classes must be able to use objects of derived classes without knowing it.所有引用基类的地方必须能够透明的使用其子类原创 2017-04-10 22:39:33 · 898 阅读 · 0 评论 -
Java设计模式—单一职责原则(SRP)
一、定义单一职责原则(Single Responsibility Principle),简称SRP。There should never be more than one reason for a class to change.应该有且仅有一个原因引起类的变更。单一职责的意义:1、降低类的复杂性,实现什么样的职责都有清晰的定义2、提高可读性原创 2017-04-09 17:32:20 · 437 阅读 · 0 评论 -
java设计模式—依赖倒置原则(DIP)
1、定义In object-oriented programming, the dependency inversion principle refers to a specific form of decoupling software modules. When following this principle, the conventional dependency relation原创 2017-04-12 20:58:38 · 635 阅读 · 0 评论