ch.sahits.game.openpatrician.model.city
Class PopulationConsume

java.lang.Object
  extended by 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

Field Summary
private  Map<EWare,Map<EPopulationClass,Double>> needs
          Store the amounts
 
Constructor Summary
PopulationConsume(String propFileName)
          Initialize the needs structure based on a property file
 
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
 

Field Detail

needs

private Map<EWare,Map<EPopulationClass,Double>> needs
Store the amounts

Constructor Detail

PopulationConsume

public PopulationConsume(String propFileName)
Initialize the needs structure based on a property file

Parameters:
propFileName -
Method Detail

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 requested
popClass - population class
popSize - number of people of the class
Returns:
amount needed per week


Copyright © 2011-2012 Sahits GmbH. All Rights Reserved.