ch.sahits.game.openpatrician.model.city
Class PopulationConsume
java.lang.Object
ch.sahits.game.openpatrician.model.city.PopulationConsume
public final class PopulationConsume
- extends Object
This class defines the amount of wares consumed by each populace class.
The amount is per week. The sizes are specified in the ware specific sizes
- Author:
- Andi Hotz, (c) Sahits GmbH, 2011
Created on Nov 28, 2011
|
Method Summary |
double |
getNeed(EWare ware,
EPopulationClass popClass,
int popSize)
Retrieve the amount needed of a ware by a population class of the size |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
needs
private Map<EWare,Map<EPopulationClass,Double>> needs
- Store the amounts
PopulationConsume
public PopulationConsume(String propFileName)
- Initialize the needs structure based on a property file
- Parameters:
propFileName -
getNeed
public double getNeed(EWare ware,
EPopulationClass popClass,
int popSize)
- Retrieve the amount needed of a ware by a population class of the size
- Parameters:
ware - to be requestedpopClass - population classpopSize - number of people of the class
- Returns:
- amount needed per week
Copyright © 2011-2012 Sahits GmbH. All Rights Reserved.