* 手机原型接口
*/
interface PhonePrototype {
PhonePrototype clone();
String getName();
void setName(String name);
String getCpu();
void setCpu(String cpu);
String getGpu();
void setGpu(String gpu);
String getColor();
void setColor(String color);
String getFlashMemory();
void setFlashMemory(String flashMemory);
String getCamera();
void setCamera(String camera);
}
* 自定义的原型IPhone原型
*/
public class IphonePrototype implements PhonePrototype,Serializable {
private String cpu;
private String gpu;
private String color;
private String flashMemory;
private String camera;
private String name;
public IphonePrototype() {
}
public String getCpu() {
return cpu;
}
public void setCpu(String cpu) {
this.cpu = cpu;
}
public String getGpu() {
return gpu;
}
public void setGpu(String gpu) {
this.gpu = gpu;
}
public String getColor() {
return color;
}
public void setColor(String color) {
this.color = color;
}
public String getFlashMemory() {
return flashMemory;
}
public void setFlashMemory(String flashMemory) {
this.flashMemory = flashMemory;
}
public String getCamera() {
return camera;
}
public void setCamera(String camera) {
this.camera = camera;
}
@Override
public PhonePrototype clone() {
return (PhonePrototype)ClassUtil.deepCopy(this);
}
@Override
public String getName() {
return name;
}
@Override
public void setName(String name) {
this.name=name;
}
}