games.strategy.engine.data
Class ProductionRule

java.lang.Object
  extended by games.strategy.engine.data.GameDataComponent
      extended by games.strategy.engine.data.DefaultNamed
          extended by games.strategy.engine.data.ProductionRule
All Implemented Interfaces:
Named, java.io.Serializable

public class ProductionRule
extends DefaultNamed
implements java.io.Serializable

Author:
Sean Bridges
See Also:
Serialized Form

Constructor Summary
ProductionRule(java.lang.String name, GameData data)
          Creates new ProductionRule
 
Method Summary
protected  void addCost(Resource resource, int quantity)
           
protected  void addResult(NamedAttachable obj, int quantity)
          Benefits must be a resource or a unit.
 IntegerMap<Resource> getCosts()
           
 IntegerMap<NamedAttachable> getResults()
           
 java.lang.String toString()
           
 
Methods inherited from class games.strategy.engine.data.DefaultNamed
equals, getName, hashCode
 
Methods inherited from class games.strategy.engine.data.GameDataComponent
getData, readInternal, writeInternal
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ProductionRule

public ProductionRule(java.lang.String name,
                      GameData data)
Creates new ProductionRule

Method Detail

addCost

protected void addCost(Resource resource,
                       int quantity)

addResult

protected void addResult(NamedAttachable obj,
                         int quantity)
Benefits must be a resource or a unit.


getCosts

public IntegerMap<Resource> getCosts()

getResults

public IntegerMap<NamedAttachable> getResults()

toString

public java.lang.String toString()
Overrides:
toString in class DefaultNamed