ch.sahits.game.openpatrician.model.city.impl
Class Contributions

java.lang.Object
  extended by ch.sahits.game.openpatrician.model.city.impl.Contributions

public class Contributions
extends 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
private  DailyContribution[] contributions
           
private  Date date
           
private  DateObject lastDate
           
 
Constructor Summary
Contributions()
           
 
Method Summary
 void contribute(IWare ware, int amount)
          Contribute the amount of the ware.
 int getContribution(IWare ware)
          Retrieve the contribution for the whole week
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

contributions

private final DailyContribution[] contributions

date

private final Date date

lastDate

private DateObject lastDate
Constructor Detail

Contributions

public Contributions()
Method Detail

getContribution

public int getContribution(IWare ware)
Retrieve the contribution for the whole week

Parameters:
ware -
Returns:

contribute

public void contribute(IWare ware,
                       int amount)
Contribute the amount of the ware. the amount may be possitive or negative

Parameters:
ware -
amount -


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