ch.sahits.game.openpatrician.model.impl
Class Company

java.lang.Object
  extended by ch.sahits.game.openpatrician.model.impl.Company
All Implemented Interfaces:
ICompany, IPeriodicalUpdate

public final class Company
extends Object
implements ICompany, IPeriodicalUpdate


Field Summary
private  long cash
           
private  long companyValue
           
private  ICity homeTown
           
private static org.apache.log4j.Logger logger
           
private  IPlayer owner
           
 
Constructor Summary
Company(IPlayer owner, ICity homeTown, long cash)
           
 
Method Summary
 long getCash()
          Retrieve the cash avalable to the company
 long getCompanyValue()
          Retrieve the total value of the company
 ICity getHomeTown()
          Retrieve the home town of the company
 void notify(DateObject date)
          The time defined as period has passed and it is now date
 void updateCash(long diff)
          Add or subtract some cash
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

private static final org.apache.log4j.Logger logger

owner

private final IPlayer owner

homeTown

private ICity homeTown

companyValue

private long companyValue

cash

private long cash
Constructor Detail

Company

public Company(IPlayer owner,
               ICity homeTown,
               long cash)
Method Detail

getHomeTown

public ICity getHomeTown()
Description copied from interface: ICompany
Retrieve the home town of the company

Specified by:
getHomeTown in interface ICompany
Returns:

getCompanyValue

public long getCompanyValue()
Description copied from interface: ICompany
Retrieve the total value of the company

Specified by:
getCompanyValue in interface ICompany
Returns:

notify

public void notify(DateObject date)
Description copied from interface: IPeriodicalUpdate
The time defined as period has passed and it is now date

Specified by:
notify in interface IPeriodicalUpdate
Parameters:
date - current date time

getCash

public long getCash()
Description copied from interface: ICompany
Retrieve the cash avalable to the company

Specified by:
getCash in interface ICompany
Returns:

updateCash

public void updateCash(long diff)
Add or subtract some cash

Specified by:
updateCash in interface ICompany
Parameters:
diff - amount of money that is transferred


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