rails.algorithms
Class RevenueBonusTemplate
java.lang.Object
rails.algorithms.RevenueBonusTemplate
- All Implemented Interfaces:
- ConfigurableComponentI
public final class RevenueBonusTemplate
- extends java.lang.Object
- implements ConfigurableComponentI
defines a template for a revenue bonus at creation time of rails objects
will be converted to a true RevenueBonus object during each revenue calculation
- Author:
- freystef
Field Summary |
protected static org.apache.log4j.Logger |
log
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
log
protected static org.apache.log4j.Logger log
RevenueBonusTemplate
public RevenueBonusTemplate()
configureFromXML
public void configureFromXML(Tag tag)
throws ConfigurationException
- Description copied from interface:
ConfigurableComponentI
- Instructs the component to configure itself from the provided XML
element.
- Specified by:
configureFromXML
in interface ConfigurableComponentI
- Throws:
ConfigurationException
finishConfiguration
public void finishConfiguration(GameManagerI parent)
throws ConfigurationException
- is not used, use toRevenueBonus instead
- Specified by:
finishConfiguration
in interface ConfigurableComponentI
- Parameters:
parent
- 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.
- Throws:
ConfigurationException
toRevenueBonus
public RevenueBonus toRevenueBonus(MapHex hex,
GameManagerI gm,
NetworkGraphBuilder ngb)
getName
public java.lang.String getName()
- Returns:
- bonus name for display
getToolTip
public java.lang.String getToolTip()
- Returns:
- bonus toolTip text
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object