- 博客(2)
- 收藏
- 关注
转载 单例模式
单例模式(Singleton Pattern)是 Java 中最简单的设计模式之一。这种类型的设计模式属于创建型模式,它提供了一种创建对象的最佳方式。 这种模式涉及到一个单一的类,该类负责创建自己的对象,同时确保只有单个对象被创建。这个类提供了一种访问其唯一的对象的方式,可以直接访问,不需要实例化该类的对象。 注意: 1、单例类只能有一个实例。 2、单例类必须自己创建自己的唯一实例。 3、单例类必...
2019-08-22 11:52:36
315
转载 桥接模式: Bridge
简介 桥接模式是结构型模式 (Structural Patterns) 的一种. Making even a simple change to a monolithic codebase is pretty hard because you must understand the entire thing very well. Making changes to smaller, well-def...
2019-08-21 21:47:18
3521
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人