官术网_书友最值得收藏!

UML class structure

The following UML diagram shows all the components of the Prototype design pattern:

UML diagram for Prototype design pattern

Let's see these components as listed in following points:

  • Prototype: The Prototype is an interface. It is uses the clone method to create instances of this interface type.
  • ConcretePrototype: This is a concrete class of the Prototype interface to implement an operation to clone itself.
  • Client: This is a caller class to create a new object of a Prototype interface by calling a clone method of the prototype interface.

Let's see a sample implementation of the prototype design pattern.

主站蜘蛛池模板: 调兵山市| 雷山县| 大关县| 桐梓县| 壤塘县| 宁蒗| 富平县| 龙山县| 乌审旗| 新民市| 嘉禾县| 秭归县| 萍乡市| 勃利县| 五峰| 友谊县| 神农架林区| 襄汾县| 鄂伦春自治旗| 威远县| 沙湾县| 凌云县| 延吉市| 台东市| 鄢陵县| 珠海市| 郯城县| 南皮县| 平定县| 宽城| 通州区| 泰宁县| 和田县| 尼木县| 海南省| 仙居县| 麻江县| 宣化县| 盖州市| 遵义市| 和林格尔县|