📄 goods.java
字号:
package dwr.demo;
public class Goods {
private int id;
private int type;
private String name;
private int price;
private int count;
/**
* @return Returns the count.
*/
public int getCount() {
return count;
}
/**
* @param count The count to set.
*/
public void setCount(int count) {
this.count = count;
}
/**
* @return Returns the name.
*/
public String getName() {
return name;
}
/**
* @param name The name to set.
*/
public void setName(String name) {
this.name = name;
}
/**
* @return Returns the price.
*/
public int getPrice() {
return price;
}
/**
* @param price The price to set.
*/
public void setPrice(int price) {
this.price = price;
}
/**
* @param count
* @param name
* @param price
*/
public Goods(int type, String name, int price, int count) {
this.id = Sequence.next();
this.type = type;
this.name = name;
this.price = price;
this.count = count;
}
public Goods(Goods goods) {
this.id = Sequence.next();
this.type = goods.getType();
this.name = goods.getName()+"--克隆"+id;
this.count = goods.getCount();
this.price = goods.getPrice();
}
/**
* @return Returns the id.
*/
public int getId() {
return id;
}
/**
* @param id The id to set.
*/
public void setId(int id) {
this.id = id;
}
/**
* @return Returns the type.
*/
public int getType() {
return type;
}
/**
* @param type The type to set.
*/
public void setType(int type) {
this.type = type;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -