data
Interface StockItem
- All Known Subinterfaces:
- CountingStock, ListenableStock, MoneyBag, Stock, StoringStock
- All Known Implementing Classes:
- StockItemImpl
- public interface StockItem
- extends Cloneable, Comparable, Nameable
An item in a Stock
.
StockItems describe actually available items. They refer to a CatalogItem
and describe an item
of the CatalogItem's type that is actually available in a Shop's storage, on an order form etc.
Note that the name as obtained via Nameable.getName()
is used as the StockItem's
key when inserting the StockItem in a Stock.
Stocks are a special form of StockItems.
- Since:
- v2.0
- Version:
- 2.0 18/08/1999
- Author:
- Steffen Zschaler
getStock
public Stock getStock()
- Get the Stock that contains this StockItem.
- Override:
- Always.
getAssociatedItem
public CatalogItem getAssociatedItem(DataBasket db)
- Get the CatalogItem that is associated to this StockItem.
- Override:
- Always.
- Parameters:
db
- the DataBasket that is used for checking visibility.
clone
public Object clone()
- Clone the StockItem.
- Override:
- Always.
- Overrides:
- clone in class Object