cartitem.java

来自「jsf 控件的中ajax的支持 jsf控件的应用」· Java 代码 · 共 34 行

JAVA
34
字号
package beans;

public class CartItem {
	private Product product;
	private Integer quantity;
	
	public CartItem(Product product, Integer quantity) {
		this.product = product;
		this.quantity = quantity;
	}

	public CartItem(Product product) {
		this(product, new Integer(1));
	}

	public Product getProduct() {
		return product;
	}

	public void setProduct(Product product) {
		this.product = product;
	}

	public Integer getQuantity() {
		return quantity;
	}

	public void setQuantity(Integer quantity) {
		this.quantity = (quantity == null) ? new Integer(0) : quantity;
	}
	
	
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?