data
Class DefaultCountingStockFromValueCreator
java.lang.Object
|
+--data.DefaultCountingStockFromValueCreator
- public class DefaultCountingStockFromValueCreator
- extends Object
- implements StockFromValueCreator
A StockFromValueCreator for CountingStocks.
This StockFromValueCreator assumes a potentially infinite source of available items and adds exactly
as many items of each type (i.e. corresponding CatalogItem) as needed to fulfil the requirement.
- Hooks:
- Add A Value To A Stock's Contents
- Since:
- v2.0
- 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.
DefaultCountingStockFromValueCreator
public DefaultCountingStockFromValueCreator(CatalogItemValue civ)
- Create a new DefaultCountingStockFromValueCreator.
- Parameters:
civ
- the CatalogItemValue used to determine the CatalogItems' values.
fillStock
public Value fillStock(Stock st,
Value v,
DataBasket db)
- This StockFromValueCreator assumes a potentially infinite source of available items and adds exactly
as many items of each type (i.e. corresponding CatalogItem) as needed to fulfil the requirement.
- Override:
- Never.
- Specified by:
- fillStock in interface StockFromValueCreator
invertedCIValueOrder
public static final Comparator invertedCIValueOrder(CatalogItemValue civ)
- Helper method that creates a Comparator that orders CatalogItems, highest value first.