Design Patterns

xiaoxiao2021-03-06  90

Prototype Pattern: Class Implements Clonable

Creating an object does not have to guide the detailed build process of the object, just copy an object prototype according to the object being passed.

Builder Pattern: It is to decouple the process of constructing complex objects and its components. Note: It is the decoupling process and components.

Builder: Includes the process of constructing each component

Director: Buildings including complex objects (complex objects include many parts)

 

(ADAPTER: In order to make an interface with two interfaces, use inheritance or excuses or combinations

Class Adapter Extends or Implements Target {

Adaptee at = new adaptee ();

}

转载请注明原文地址:https://www.9cbs.com/read-122347.html

New Post(0)