Class Contributions
- java.lang.Object
-
- ch.sahits.game.openpatrician.model.city.impl.Contributions
-
public class Contributions extends java.lang.Object
Tracking the contibutions of ware over the last seven days rolling.- Author:
- Andi Hotz, (c) Sahits GmbH, 2012 Created on Jul 24, 2012
-
-
Field Summary
Fields Modifier and Type Field Description private com.google.common.collect.Multimap<IWare,Contribution>
contributions
private Date
date
-
Constructor Summary
Constructors Constructor Description Contributions()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
contribute(IWare ware, int amount)
Contribute the amount of the ware.int
getContribution(IWare ware)
Retrieve the contribution for the whole week
-
-
-
Field Detail
-
date
@Autowired private Date date
-
contributions
private com.google.common.collect.Multimap<IWare,Contribution> contributions
-
-
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
-
-