Select Page

Prototype

Prototype

Specify the kinds of objects to create using a prototypical instance, and create new objects by copying this prototype.

Source Code

/**  * Declares interface for cloning itself.  * @role __Prototype  */ public interface Prototype {         Prototype createCopy();}  /**  * Implements an operation for cloning itself.  */ public class ConcretePrototype1 implements Prototype {         protected ConcretePrototype1(ConcretePrototype1 prototype)          {            // initialize new copy with prototype         }          public Prototype createCopy() {            return new ConcretePrototype1(this);                 } }  /**  * Implements an operation for cloning itself.  */ public class ConcretePrototype1 implements Prototype {         protected ConcretePrototype1(ConcretePrototype1 prototype) {           // initialize new copy with prototype         }          public Prototype createCopy() {                 return new ConcretePrototype1(this);                 } } 

About The Author

I worked with various Insurances companies across Switzerland on online applications handling billion premium volumes. I love to continuously spark my creativity in many different and challenging open-source projects fueled by my great passion for innovation and blockchain technology.In my technical role as a senior software engineer and Blockchain consultant, I help to define and implement innovative solutions in the scope of both blockchain and traditional products, solutions, and services. I can support the full spectrum of software development activities, starting from analyzing ideas and business cases and up to the production deployment of the solutions.I'm the Founder and CEO of Disruptr GmbH.

Categories