提交 ed81bcf6 编写于 作者: I Ilkka Seppala

Commented prototype example.

上级 2038d69d
package com.iluwatar;
/**
*
* In Prototype we have a factory class (HeroFactoryImpl) producing
* objects by cloning existing ones. In this example the factory's
* prototype objects are given as constructor parameters.
*
*/
public class App
{
public static void main( String[] args )
......
package com.iluwatar;
/**
*
* Interface for the factory class.
*
*/
public interface HeroFactory {
Mage createMage();
......
package com.iluwatar;
/**
*
* Concrete factory class.
*
*/
public class HeroFactoryImpl implements HeroFactory {
private Mage mage;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册