T - type of real cart item.public class SingleItem<T> extends java.lang.Object implements IItem<T>
| Constructor and Description |
|---|
SingleItem(IItem<T> item,
int sequenceNum,
int serialNum) |
| Modifier and Type | Method and Description |
|---|---|
T |
as()
購物車品項的真實類別
|
boolean |
equals(java.lang.Object obj) |
java.io.Serializable |
getIdentity()
購物車品項識別,例如 產品代號
|
IItem<T> |
getItem()
購物車裡的物品
|
double |
getOriginalPrice()
原價
|
long |
getQuantity()
品項的數量
|
double |
getSalePrice()
售價
|
int |
getSequenceNum()
排序編號
|
int |
getSerialNum()
同品項物品的編號(從1起算)
|
int |
hashCode() |
boolean |
isExclusiveLock()
for
Calculator use only. |
boolean |
isSerialLast()
是否為同品項物品的最後一項
|
SingleItem<T> |
setExclusiveLock(boolean exclusiveLock)
for
Calculator use only. |
void |
setQuantity(long quantity)
設定品項數量
|
void |
setSerialLast(boolean serialLast)
Detect whether the current visit item is the last item of the same series
or not.
|
java.lang.String |
toString() |
public SingleItem(IItem<T> item, int sequenceNum, int serialNum)
public java.io.Serializable getIdentity()
IItemgetIdentity in interface IItem<T>IItem.getIdentity()public T as()
IItemas in interface IItem<T>IItem.as()public long getQuantity()
IItemgetQuantity in interface IItem<T>IItem.getQuantity()public void setQuantity(long quantity)
IItemsetQuantity in interface IItem<T>quantity - IItem.setQuantity(long)public double getSalePrice()
IItemgetSalePrice in interface IItem<T>IItem.getSalePrice()public double getOriginalPrice()
IItemgetOriginalPrice in interface IItem<T>IItem.getOriginalPrice()public int getSequenceNum()
public int getSerialNum()
public boolean isSerialLast()
public void setSerialLast(boolean serialLast)
serialLast - public boolean isExclusiveLock()
Calculator use only.public SingleItem<T> setExclusiveLock(boolean exclusiveLock)
Calculator use only.exclusiveLock - public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.ObjectCopyright © 2018. All rights reserved.