public class CityProductionConsumptionKnowledge extends Object implements ch.sahits.game.openpatrician.model.player.ICityProductionConsumptionKnowledge
| Modifier and Type | Field and Description |
|---|---|
private Map<ch.sahits.game.openpatrician.model.product.IWare,Integer> |
consumptionAmounts |
private Map<ch.sahits.game.openpatrician.model.product.IWare,Integer> |
productionAmounts |
private Map<ch.sahits.game.openpatrician.model.product.IWare,Integer> |
storedAmounts |
| Constructor and Description |
|---|
CityProductionConsumptionKnowledge() |
| Modifier and Type | Method and Description |
|---|---|
int |
getConsumptionAmount(ch.sahits.game.openpatrician.model.product.IWare ware) |
int |
getProductionAmount(ch.sahits.game.openpatrician.model.product.IWare ware) |
List<ch.sahits.game.openpatrician.model.product.IWare> |
getSortedProductionWares() |
int |
getStoredAmount(ch.sahits.game.openpatrician.model.product.IWare ware) |
private void |
init() |
void |
updateConsumption(ch.sahits.game.openpatrician.model.product.IWare ware,
int amount)
Update the knowledge about the weekly consumed amounts.
|
void |
updateProduction(ch.sahits.game.openpatrician.model.product.IWare ware,
int amount)
Update the knowlege about the weekly produced amounts.
|
void |
updateStored(ch.sahits.game.openpatrician.model.product.IWare ware,
int amount)
Update the knowledge about the stored amounts.
|
private Map<ch.sahits.game.openpatrician.model.product.IWare,Integer> productionAmounts
private Map<ch.sahits.game.openpatrician.model.product.IWare,Integer> consumptionAmounts
@PostConstruct @IgnoreOnDeserialisation private void init()
public void updateProduction(ch.sahits.game.openpatrician.model.product.IWare ware,
int amount)
ware - amount - public List<ch.sahits.game.openpatrician.model.product.IWare> getSortedProductionWares()
public int getProductionAmount(ch.sahits.game.openpatrician.model.product.IWare ware)
getProductionAmount in interface ch.sahits.game.openpatrician.model.player.ICityProductionConsumptionKnowledgepublic void updateConsumption(ch.sahits.game.openpatrician.model.product.IWare ware,
int amount)
ware - amount - public int getConsumptionAmount(ch.sahits.game.openpatrician.model.product.IWare ware)
getConsumptionAmount in interface ch.sahits.game.openpatrician.model.player.ICityProductionConsumptionKnowledgepublic void updateStored(ch.sahits.game.openpatrician.model.product.IWare ware,
int amount)
ware - amount - public int getStoredAmount(ch.sahits.game.openpatrician.model.product.IWare ware)
getStoredAmount in interface ch.sahits.game.openpatrician.model.player.ICityProductionConsumptionKnowledgeCopyright © 2011-2016 Sahits GmbH. All Rights Reserved.