rails.algorithms
Class RevenueBonusTemplate

java.lang.Object
  extended by 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
           
 
Constructor Summary
RevenueBonusTemplate()
           
 
Method Summary
 void configureFromXML(Tag tag)
          Instructs the component to configure itself from the provided XML element.
 void finishConfiguration(GameManagerI parent)
          is not used, use toRevenueBonus instead
 java.lang.String getName()
           
 java.lang.String getToolTip()
           
 RevenueBonus toRevenueBonus(MapHex hex, GameManagerI gm, NetworkGraphBuilder ngb)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

log

protected static org.apache.log4j.Logger log
Constructor Detail

RevenueBonusTemplate

public RevenueBonusTemplate()
Method Detail

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