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

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.

主站蜘蛛池模板: 库伦旗| 武定县| 蒲城县| 望江县| 雷波县| 常德市| 南丰县| 宁德市| 淄博市| 平谷区| 广水市| 雅江县| 钟山县| 渝北区| 宁德市| 旬阳县| 洛宁县| 鹤岗市| 民勤县| 崇左市| 玉树县| 昭平县| 油尖旺区| 乡城县| 张家口市| 汝州市| 伊吾县| 保定市| 武乡县| 会昌县| 香格里拉县| 苗栗市| 集贤县| 左权县| 嵊州市| 施甸县| 昭苏县| 嫩江县| 清水河县| 虞城县| 梁山县|