|
Thursday, 20 January 2005 21:43 |
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);
}
}
|
|
Last Updated ( Saturday, 18 June 2005 00:02 )
|
Anyone has a tutorial for developing ...
what type of antifreeze do i use in m...
css lessons - css scrollbar examples ...
SILLY
Now I can stand at the station watchi...