net.sf.freecol.common.model
Class UnitTypeChange

java.lang.Object
  extended by net.sf.freecol.common.model.FreeColObject
      extended by net.sf.freecol.common.model.UnitTypeChange

public class UnitTypeChange
extends FreeColObject


Nested Class Summary
static class UnitTypeChange.ChangeType
           
 
Field Summary
 
Fields inherited from class net.sf.freecol.common.model.FreeColObject
ID_ATTRIBUTE_TAG
 
Constructor Summary
UnitTypeChange()
           
UnitTypeChange(javax.xml.stream.XMLStreamReader in)
          Creates a new UnitTypeChange instance.
UnitTypeChange(javax.xml.stream.XMLStreamReader in, Specification specification)
           
 
Method Summary
 boolean appliesTo(Player player)
          Describe appliesTo method here.
 boolean asResultOf(UnitTypeChange.ChangeType type)
          Describe asResultOf method here.
 boolean canBeTaught()
           
 java.util.Set<UnitTypeChange.ChangeType> getChangeTypes()
           
 UnitType getNewUnitType()
          Get the NewUnitType value.
 java.util.List<Scope> getScopes()
           
 int getTurnsToLearn()
          Get the TurnsToLearn value.
 void readChildren(javax.xml.stream.XMLStreamReader in, Specification specification)
           
 void setNewUnitType(UnitType newNewUnitType)
          Set the NewUnitType value.
 void setTurnsToLearn(int newTurnsToLearn)
          Set the TurnsToLearn value.
 
Methods inherited from class net.sf.freecol.common.model.FreeColObject
addPropertyChangeListener, addPropertyChangeListener, fireIndexedPropertyChange, fireIndexedPropertyChange, fireIndexedPropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getAttribute, getAttribute, getAttribute, getAttribute, getId, getPropertyChangeListeners, getPropertyChangeListeners, getXMLElementTagName, hasAbility, hasAttribute, hasListeners, readFromXML, readFromXMLElement, removePropertyChangeListener, removePropertyChangeListener, toXML, toXML, toXML, toXMLElement, toXMLElement, toXMLElement, toXMLElement, toXMLElementPartial, writeAttribute, writeFreeColGameObject
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UnitTypeChange

public UnitTypeChange()

UnitTypeChange

public UnitTypeChange(javax.xml.stream.XMLStreamReader in)
               throws javax.xml.stream.XMLStreamException
Creates a new UnitTypeChange instance.

Parameters:
in - a XMLStreamReader value
Throws:
javax.xml.stream.XMLStreamException - if an error occurs

UnitTypeChange

public UnitTypeChange(javax.xml.stream.XMLStreamReader in,
                      Specification specification)
               throws javax.xml.stream.XMLStreamException
Throws:
javax.xml.stream.XMLStreamException
Method Detail

getScopes

public java.util.List<Scope> getScopes()

getChangeTypes

public java.util.Set<UnitTypeChange.ChangeType> getChangeTypes()

asResultOf

public boolean asResultOf(UnitTypeChange.ChangeType type)
Describe asResultOf method here.

Parameters:
type - a ChangeType value
Returns:
a boolean value

appliesTo

public boolean appliesTo(Player player)
Describe appliesTo method here.

Parameters:
player - a Player value
Returns:
a boolean value

getTurnsToLearn

public final int getTurnsToLearn()
Get the TurnsToLearn value.

Returns:
an int value

setTurnsToLearn

public final void setTurnsToLearn(int newTurnsToLearn)
Set the TurnsToLearn value.

Parameters:
newTurnsToLearn - The new TurnsToLearn value.

canBeTaught

public boolean canBeTaught()

getNewUnitType

public final UnitType getNewUnitType()
Get the NewUnitType value.

Returns:
an UnitType value

setNewUnitType

public final void setNewUnitType(UnitType newNewUnitType)
Set the NewUnitType value.

Parameters:
newNewUnitType - The new NewUnitType value.

readChildren

public void readChildren(javax.xml.stream.XMLStreamReader in,
                         Specification specification)
                  throws javax.xml.stream.XMLStreamException
Throws:
javax.xml.stream.XMLStreamException