设计模式
syouya.shiraki
这个作者很懒,什么都没留下…
展开
-
设计模式-桥接模式的实现[JAVA]
设计模式-桥接模式的实现[JAVA] decouple an abstraction from its implementation so that the two can vary independently", introduced by the Gang of Four–翻译过来是:将抽象与实现解耦,以便让他们独立变化。直接理解起来确实比较难理解,我个人的理解偏像另一种表述“一个类存在两个或两个以上的独立变化的维度,然后通过组合的方式,让这两个或者多个维度上可以进行独立的扩展。”,个人对这个模式的理原创 2020-10-16 17:17:09 · 352 阅读 · 1 评论 -
设计模式-代理模式的实现[JAVA]
设计模式-代理模式的实现[JAVA] A proxy, in its most general form, is a class functioning as an interface to something else. The proxy could interface to anything: a network connection, a large object in memory, a file, or some other resource that is expensive or impo原创 2020-10-15 15:32:07 · 252 阅读 · 0 评论 -
设计模式-原型模式的实现[JAVA]
设计模式-原型模式的实现[JAVA]及问题整理-面试必备-超详 The prototype pattern is a creational design pattern in software development. It is used when the type of objects to create is determined by a prototypical instance, which is cloned to produce new objects. This pattern is u原创 2020-09-23 15:47:05 · 291 阅读 · 0 评论 -
设计模式-生成器模式的实现[JAVA]
设计模式-生成器模式的2种不同实现[JAVA]及问题整理-面试必备-超详 摘要 The builder pattern is a design pattern designed to provide a flexible solution to various object creation problems in object-oriented programming. The intent of the Builder design pattern is to separate the constru原创 2020-09-16 20:11:30 · 375 阅读 · 0 评论 -
设计模式-工厂模式的3中不同实现[JAVA]
设计模式-工厂模式的3中不同实现[JAVA]及工厂问题整理-面试必备-超级详细 工厂模式简介 In Factory pattern, we create object without exposing the creation logic to the client and refer to newly created object using a common interface.可以简单理解为:通过共用的接口或者工厂来创建对象,而不需求关注对象创建细节。调用端与工厂进行交互,与对象进行解耦。 3种不原创 2020-09-15 17:39:18 · 450 阅读 · 0 评论 -
设计模式-单例模式的八种不同实现[JAVA]
设计模式-单例模式-八种不同实现[JAVA]及单例问题整理-面试必备-超级详细 单例模式简介 the singleton pattern is a software design pattern that restricts the instantiation of a class to one “single” instance. 简单可以理解为:一个类在程序运行期类只能创建唯一的一个对象。 7种不同的实现版本【JAVA8实现】 普通的静态实例实现 本质为饿汉式,启动时就加载,实现也比较简单,如原创 2020-09-14 17:35:18 · 347 阅读 · 0 评论