|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectrails.game.Bank
public class Bank
Field Summary | |
---|---|
protected static org.apache.log4j.Logger |
log
|
Constructor Summary | |
---|---|
Bank()
|
Method Summary | |
---|---|
void |
addCash(int amount)
Adds cash back to the bank |
void |
configureFromXML(Tag tag)
Instructs the component to configure itself from the provided XML element. |
void |
finishConfiguration(GameManagerI gameManager)
This method is intended to be called for each configurable component, to perforn any initialisation activities that require any other components to be initialised first. |
static java.lang.String |
format(int amount)
|
static java.lang.String |
formatIntegerArray(int[] amountList)
|
int |
getCash()
Returns the amount of cash. |
ModelObject |
getCashModel()
|
java.lang.String |
getFormattedCash()
|
Portfolio |
getIpo()
|
java.lang.String |
getName()
Get the cash owner's name (needed for logging) |
Portfolio |
getPool()
|
Portfolio |
getScrapHeap()
|
Portfolio |
getUnavailable()
|
void |
setCash(int i)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static org.apache.log4j.Logger log
Constructor Detail |
---|
public Bank()
Method Detail |
---|
public void configureFromXML(Tag tag) throws ConfigurationException
ConfigurableComponentI
configureFromXML
in interface ConfigurableComponentI
ConfigurationException
rails.game.ConfigurableComponentI#configureFromXML(org.w3c.dom.Element)
public void finishConfiguration(GameManagerI gameManager)
ConfigurableComponentI
This method should be called where necessary after all XML file parsing has completed, so that all objects that need to be related to do exist.
finishConfiguration
in interface ConfigurableComponentI
gameManager
- The 'parent' configurable component is passed to allow
the 'child' to access any other object without the need to resort to
static calls where possible.public Portfolio getIpo()
public Portfolio getScrapHeap()
public int getCash()
CashHolder
getCash
in interface CashHolder
public void addCash(int amount)
addCash
in interface CashHolder
public Portfolio getPool()
public Portfolio getUnavailable()
public void setCash(int i)
Set
- Bank's cash.public java.lang.String getName()
CashHolder
getName
in interface CashHolder
public java.lang.String getFormattedCash()
public ModelObject getCashModel()
getCashModel
in interface CashHolder
public static java.lang.String format(int amount)
public static java.lang.String formatIntegerArray(int[] amountList)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |