Class Contributions
- java.lang.Object
-
- ch.sahits.game.openpatrician.model.city.impl.Contributions
-
public class Contributions extends java.lang.ObjectTracking the contibutions of ware over the last seven days rolling.- Author:
- Andi Hotz, (c) Sahits GmbH, 2012 Created on Jul 24, 2012
-
-
Constructor Summary
Constructors Constructor Description Contributions()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcontribute(IWare ware, int amount)Contribute the amount of the ware.intgetContribution(IWare ware)Retrieve the contribution for the whole week
-
-
-
Method Detail
-
getContribution
public int getContribution(IWare ware)
Retrieve the contribution for the whole week- Parameters:
ware- for thitch to find the contribution- Returns:
- summed up contributions of the last wek.
-
contribute
public void contribute(IWare ware, int amount)
Contribute the amount of the ware. the amount may be possitive or negative- Parameters:
ware- that is contributedamount- of the contributed ware
-
-