## edu.cwru.SimpleRTS.model.upgrade
Class UpgradeTemplate

    java.lang.Object
      edu.cwru.SimpleRTS.model.Template<Upgrade>
          edu.cwru.SimpleRTS.model.upgrade.UpgradeTemplate

All Implemented Interfaces:
  java.io.Serializable

    public class UpgradeTemplate

extends Template<Upgrade>

See Also:
  Serialized Form

Nested Class Summary

Nested classes/interfaces inherited from class edu.cwru.SimpleRTS.model.Template
`Template.TemplateView`

Field Summary

Fields inherited from class edu.cwru.SimpleRTS.model.Template
`ID`

Constructor Summary
`UpgradeTemplate(int attackchange, int defensechange, java.lang.String[] affectedunits)`

Method Summary
`java.util.List<UnitTemplate>` `getAffectedUnits()`
`int` `getAttackChange()`
`int` `getDefenseChange()`
`void` `namesToIds(java.util.List<UnitTemplate> unittemplates, java.util.List<UpgradeTemplate> upgradetemplates)` Turn this template's list of prerequisites and things it produces into their ids
`Upgrade` `produceInstance()` A factory method that produces copies of a "default" object

Methods inherited from class edu.cwru.SimpleRTS.model.Template
`addBuildPrereqItem, addUpgradePrereqItem, canProduce, equals, getFoodCost, getGoldCost, getName, getPlayer, getTimeCost, getView, getWoodCost, hashCode, reserveIDsUpTo, setFoodCost, setGoldCost, setName, setPlayer, setTimeCost, setWoodCost`

Methods inherited from class java.lang.Object
`getClass, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### UpgradeTemplate

    public UpgradeTemplate(int attackchange,
                           int defensechange,
                           java.lang.String[] affectedunits)

Method Detail

### produceInstance

    public Upgrade produceInstance()

  Description copied from class: `Template`
  A factory method that produces copies of a "default" object

  Specified by:
    `produceInstance` in class `Template<Upgrade>`
  Returns:

### getAffectedUnits

    public java.util.List<UnitTemplate> getAffectedUnits()

### getAttackChange

    public int getAttackChange()

### getDefenseChange

    public int getDefenseChange()

### namesToIds

    public void namesToIds(java.util.List<UnitTemplate> unittemplates,
                           java.util.List<UpgradeTemplate> upgradetemplates)

  Description copied from class: `Template`
  Turn this template's list of prerequisites and things it produces into their ids

  Overrides:
    `namesToIds` in class `Template<Upgrade>`