|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.sf.freecol.common.model.FreeColObject
net.sf.freecol.common.model.UnitTypeChange
public class UnitTypeChange
| Nested Class Summary | |
|---|---|
static class |
UnitTypeChange.ChangeType
|
| Field Summary | |
|---|---|
protected java.util.Map<UnitTypeChange.ChangeType,java.lang.Integer> |
changeTypes
|
private UnitType |
newUnitType
Describe newUnitType here. |
private java.util.List<Scope> |
scopes
A list of Scopes limiting the applicability of this Feature. |
static java.util.Map<UnitTypeChange.ChangeType,java.lang.String> |
tags
|
protected int |
turnsToLearn
|
| Fields inherited from class net.sf.freecol.common.model.FreeColObject |
|---|
ARRAY_SIZE, ID_ATTRIBUTE, ID_ATTRIBUTE_TAG, INFINITY, logger, NO_ID, PARTIAL_ATTRIBUTE, UNDEFINED, VALUE_TAG |
| Constructor Summary | |
|---|---|
UnitTypeChange()
|
|
UnitTypeChange(javax.xml.stream.XMLStreamReader in,
Specification specification)
Creates a new UnitTypeChange instance. |
|
| Method Summary | |
|---|---|
boolean |
appliesTo(Player player)
Describe appliesTo method here. |
boolean |
asResultOf(UnitTypeChange.ChangeType type)
Describe asResultOf method here. |
boolean |
canBeTaught()
|
java.util.Map<UnitTypeChange.ChangeType,java.lang.Integer> |
getChangeTypes()
|
UnitType |
getNewUnitType()
Get the NewUnitType value. |
int |
getProbability(UnitTypeChange.ChangeType type)
Returns the probability of a change taking place (defaults to zero). |
java.util.List<Scope> |
getScopes()
|
int |
getTurnsToLearn()
Get the TurnsToLearn value. |
static java.lang.String |
getXMLElementTagName()
Returns the tag name of the root element representing this object. |
protected void |
readAttributes(javax.xml.stream.XMLStreamReader in,
Specification specification)
Initialize this object from an XML-representation of this object. |
protected void |
readChildren(javax.xml.stream.XMLStreamReader in,
Specification specification)
Reads the children of this object from an XML stream. |
void |
setNewUnitType(UnitType newNewUnitType)
Set the NewUnitType value. |
void |
setTurnsToLearn(int newTurnsToLearn)
Set the TurnsToLearn value. |
protected void |
toXMLImpl(javax.xml.stream.XMLStreamWriter out)
This method writes an XML-representation of this object to the given stream. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private UnitType newUnitType
public static final java.util.Map<UnitTypeChange.ChangeType,java.lang.String> tags
protected int turnsToLearn
protected java.util.Map<UnitTypeChange.ChangeType,java.lang.Integer> changeTypes
private java.util.List<Scope> scopes
| Constructor Detail |
|---|
public UnitTypeChange()
public UnitTypeChange(javax.xml.stream.XMLStreamReader in,
Specification specification)
throws javax.xml.stream.XMLStreamException
UnitTypeChange instance.
in - a XMLStreamReader valuespecification - a Specification value
javax.xml.stream.XMLStreamException - if an error occurs| Method Detail |
|---|
public final int getProbability(UnitTypeChange.ChangeType type)
type - a ChangeType value
int valuepublic java.util.List<Scope> getScopes()
public java.util.Map<UnitTypeChange.ChangeType,java.lang.Integer> getChangeTypes()
public boolean asResultOf(UnitTypeChange.ChangeType type)
asResultOf method here.
type - a ChangeType value
boolean valuepublic boolean appliesTo(Player player)
appliesTo method here.
player - a Player value
boolean valuepublic final int getTurnsToLearn()
TurnsToLearn value.
int valuepublic final void setTurnsToLearn(int newTurnsToLearn)
TurnsToLearn value.
newTurnsToLearn - The new TurnsToLearn value.public boolean canBeTaught()
public final UnitType getNewUnitType()
NewUnitType value.
UnitType valuepublic final void setNewUnitType(UnitType newNewUnitType)
NewUnitType value.
newNewUnitType - The new NewUnitType value.
protected void toXMLImpl(javax.xml.stream.XMLStreamWriter out)
throws javax.xml.stream.XMLStreamException
toXMLImpl in class FreeColObjectout - The target stream.
javax.xml.stream.XMLStreamException - if there are any problems writing
to the stream.
protected void readAttributes(javax.xml.stream.XMLStreamReader in,
Specification specification)
throws javax.xml.stream.XMLStreamException
readAttributes in class FreeColObjectin - The XML input stream.specification - A Specification to use.
javax.xml.stream.XMLStreamException - if a problem was encountered
during parsing.
protected void readChildren(javax.xml.stream.XMLStreamReader in,
Specification specification)
throws javax.xml.stream.XMLStreamException
readChildren in class FreeColObjectin - The XML input stream.specification - A Specification to use.
javax.xml.stream.XMLStreamException - if a problem was encountered
during parsing.public static final java.lang.String getXMLElementTagName()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||