?? cartitem.java
字號(hào):
package com.publish.shop.order.javabeans;import java.math.*;import com.publish.shop.order.javabeans.ItemInfo;public class CartItem { private ItemInfo item; private int quantity; private boolean inStock; private BigDecimal total; public CartItem(){ quantity = 0; } public ItemInfo getItem() { return item; } public void setItem(ItemInfo item) { this.item = item; } public int getQuantity() { return quantity; } public void setQuantity(int quantity) { this.quantity = quantity; } public boolean getInStock() { return inStock; } public void setInStock(boolean inStock) { this.inStock = inStock; } public BigDecimal getTotal() { return total; } public void setTotal(BigDecimal total) { this.total = total; } private void calcTotal() { if (item != null && item.getListPrice()!=null) { total = item.getListPrice().multiply(new BigDecimal(quantity)); } else { total = null; } } public void increaseQuantity() { quantity++; calcTotal(); }}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -