data
Class StockFromStockCreator
java.lang.Object
|
+--data.StockFromStockCreator
- Direct Known Subclasses:
- StockFromStockCreatorBT
- public class StockFromStockCreator
- extends Object
- implements StockFromValueCreator
StockFromValueCreator that tries to fill a Stock using only items from another Stock.
- Hooks:
- Add A Value To A Stock's Contents
- Since:
- v0.5
- Version:
- 2.0 18/08/1999
- Author:
- Steffen Zschaler
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
m_civEvaluator
protected CatalogItemValue m_civEvaluator
- The CatalogItemValue used to determine the CatalogItems' values.
m_stSource
protected Stock m_stSource
- The source Stock.
StockFromStockCreator
public StockFromStockCreator(Stock stSource,
CatalogItemValue civ)
- Create a new StockFromStockCreator.
- Parameters:
stSource
- the source Stock.civ
- the CatalogItemValue used to determine the CatalogItems' values.
fillStock
public Value fillStock(Stock st,
Value v,
DataBasket db)
- Try to fill the given Stock using only items from the source Stock.
As this algorithm does not use backtracking, it may not always find a solution even if one would be
possible.
Attention: The items that are added to the destination Stock will be removed from the
source Stock.
- Override:
- Never.
- Specified by:
- fillStock in interface StockFromValueCreator