|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjfreerails.world.top.TransactionAggregator
jfreerails.controller.FinancialDataGatherer
public class FinancialDataGatherer
Gathers the financial data for a company.
Field Summary | |
---|---|
private int |
bonds
|
private int |
playerID
|
private int[] |
stockInRRs
|
private int[] |
stockInThisRRs
|
private int |
totalShares
|
Fields inherited from class jfreerails.world.top.TransactionAggregator |
---|
monetaryTotals, principal, runningTotal, w |
Constructor Summary | |
---|---|
FinancialDataGatherer(ReadOnlyWorld w,
FreerailsPrincipal principal)
|
Method Summary | |
---|---|
int[] |
bondInterestRates()
|
boolean |
canBuyStock()
|
boolean |
canIssueBond()
|
void |
changeStake(int stakeHolder,
int deltaStock)
|
void |
changeTreasuryStock(int deltaStock)
|
protected boolean |
condition(int transactionID)
Returns true if we should count the specified transactions. |
int |
getBonds()
|
int[] |
getStockInRRs()
|
int[] |
getStockInThisRRs()
|
protected void |
incrementRunningTotal(int transactionID)
|
Money |
netWorth()
|
int |
nextBondInterestRate()
|
protected void |
setTotalsArrayLength(int length)
Creates a new array with the specified length to store monetary totals and sets the running total to zero. |
int |
sharesHeldByPublic()
|
protected void |
storeRunningTotal(int timeIndex)
Stores the current running total in the totals array at the specified position. |
boolean |
thisRRHasStakeIn(int otherReId)
|
int |
totalShares()
Returns The number of open Shares |
int |
treasuryStock()
Returns the number of stock in the Treasury |
Methods inherited from class jfreerails.world.top.TransactionAggregator |
---|
calculateValue, calculateValues, getTimes, setTimes |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private int totalShares
private final int playerID
private int bonds
private int[] stockInRRs
private int[] stockInThisRRs
Constructor Detail |
---|
public FinancialDataGatherer(ReadOnlyWorld w, FreerailsPrincipal principal)
Method Detail |
---|
protected void incrementRunningTotal(int transactionID)
incrementRunningTotal
in class TransactionAggregator
protected void setTotalsArrayLength(int length)
TransactionAggregator
setTotalsArrayLength
in class TransactionAggregator
protected void storeRunningTotal(int timeIndex)
TransactionAggregator
storeRunningTotal
in class TransactionAggregator
public void changeTreasuryStock(int deltaStock)
public void changeStake(int stakeHolder, int deltaStock)
public boolean canIssueBond()
public boolean canBuyStock()
public int nextBondInterestRate()
public int[] bondInterestRates()
public int treasuryStock()
public int totalShares()
public int sharesHeldByPublic()
public boolean thisRRHasStakeIn(int otherReId)
public Money netWorth()
protected boolean condition(int transactionID)
TransactionAggregator
condition
in class TransactionAggregator
public int[] getStockInThisRRs()
public int[] getStockInRRs()
public int getBonds()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |