|
|||||||||
| 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.FreeColGameObjectType
net.sf.freecol.common.model.NationType
public abstract class NationType
Represents one of the nations present in the game.
| Nested Class Summary | |
|---|---|
static class |
NationType.AggressionLevel
|
static class |
NationType.SettlementNumber
|
| Field Summary | |
|---|---|
private NationType.AggressionLevel |
aggression
The aggression of this Nation. |
private NationType.SettlementNumber |
numberOfSettlements
The number of settlements this Nation has. |
private java.util.List<SettlementType> |
settlementTypes
The types of settlement this Nation has. |
| 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 | |
|---|---|
NationType(java.lang.String id,
Specification specification)
|
|
| Method Summary | |
|---|---|
NationType.AggressionLevel |
getAggression()
Get the Aggression value. |
SettlementType |
getCapitalType()
Return the SettlementType of the nation type's
capital. |
NationType.SettlementNumber |
getNumberOfSettlements()
Get the NumberOfSettlements value. |
SettlementType |
getSettlementType(boolean isCapital)
|
SettlementType |
getSettlementType(java.lang.String id)
|
java.util.List<SettlementType> |
getSettlementTypes()
Get the TypeOfSettlement value. |
abstract boolean |
isEuropean()
Whether this is a EuropeanNation, i.e. |
abstract boolean |
isIndian()
Whether this is a IndianNation. |
abstract boolean |
isREF()
Whether this is a EuropeanREFNation. |
protected void |
readAttributes(javax.xml.stream.XMLStreamReader in)
Reads the attributes of this object from an XML stream. |
protected void |
readChild(javax.xml.stream.XMLStreamReader in)
Reads a child object. |
void |
setAggression(NationType.AggressionLevel newAggression)
Set the Aggression value. |
void |
setNumberOfSettlements(NationType.SettlementNumber newNumberOfSettlements)
Set the NumberOfSettlements value. |
protected void |
writeAttributes(javax.xml.stream.XMLStreamWriter out)
Write the attributes of this object to a stream. |
protected void |
writeChildren(javax.xml.stream.XMLStreamWriter out)
Write the children of this object to a stream. |
| Methods inherited from class net.sf.freecol.common.model.FreeColGameObjectType |
|---|
addAbility, addModifier, applyDifficultyLevel, getDescriptionKey, getFeatureContainer, getIndex, getModifierIndex, getModifierIndex, getModifierSet, getNameKey, hasAbility, hasAbility, isAbstractType, readChildren, setAbstractType, setFeatureContainer, setIndex, setModifierIndex, toString, toXMLImpl, toXMLImpl |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private NationType.SettlementNumber numberOfSettlements
private NationType.AggressionLevel aggression
private java.util.List<SettlementType> settlementTypes
| Constructor Detail |
|---|
public NationType(java.lang.String id,
Specification specification)
| Method Detail |
|---|
public final java.util.List<SettlementType> getSettlementTypes()
TypeOfSettlement value.
SettlementType valuepublic SettlementType getCapitalType()
SettlementType of the nation type's
capital.
SettlementType valuepublic SettlementType getSettlementType(boolean isCapital)
public SettlementType getSettlementType(java.lang.String id)
public final NationType.SettlementNumber getNumberOfSettlements()
NumberOfSettlements value.
SettlementNumber valuepublic final void setNumberOfSettlements(NationType.SettlementNumber newNumberOfSettlements)
NumberOfSettlements value.
newNumberOfSettlements - The new NumberOfSettlements value.public final NationType.AggressionLevel getAggression()
Aggression value.
AggressionLevel valuepublic final void setAggression(NationType.AggressionLevel newAggression)
Aggression value.
newAggression - The new Aggression value.public abstract boolean isEuropean()
public abstract boolean isIndian()
public abstract boolean isREF()
protected void readAttributes(javax.xml.stream.XMLStreamReader in)
throws javax.xml.stream.XMLStreamException
readAttributes in class FreeColGameObjectTypein - The XML input stream.
javax.xml.stream.XMLStreamException - if a problem was encountered
during parsing.
protected void readChild(javax.xml.stream.XMLStreamReader in)
throws javax.xml.stream.XMLStreamException
readChild in class FreeColGameObjectTypein - The XML stream to read.
javax.xml.stream.XMLStreamException - if an error occurs
protected void writeAttributes(javax.xml.stream.XMLStreamWriter out)
throws javax.xml.stream.XMLStreamException
writeAttributes in class FreeColObjectout - The target stream.
javax.xml.stream.XMLStreamException - if there are any problems writing to
the stream.
protected void writeChildren(javax.xml.stream.XMLStreamWriter out)
throws javax.xml.stream.XMLStreamException
writeChildren in class FreeColGameObjectTypeout - The target stream.
javax.xml.stream.XMLStreamException - if there are any problems writing to
the stream.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||