net.sf.freecol.common.model
Class Nation

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

public class Nation
extends FreeColGameObjectType

Represents one of the nations present in the game.


Field Summary
static java.lang.String[] EUROPEAN_NATIONS
           
private  int preferredLatitude
          Describe preferredLatitude here.
private  Nation refNation
          Describe refNation here.
private  boolean selectable
          Describe selectable here.
private  boolean startsOnEastCoast
          Describe startsOnEastCoast here.
private  NationType type
          Describe type here.
static java.lang.String UNKNOWN_NATION_ID
           
 
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
Nation(java.lang.String id, Specification specification)
           
 
Method Summary
 int getPreferredLatitude()
          Get the PreferredLatitude value.
 Nation getRefNation()
          Get the RefNation value.
 java.lang.String getRulerNameKey()
          Get the RulerName value.
 NationType getType()
          Get the Type value.
static java.lang.String getXMLElementTagName()
          Returns the tag name of the root element representing this object.
 boolean isSelectable()
          Get the Selectable value.
protected  void readAttributes(javax.xml.stream.XMLStreamReader in)
          Reads the attributes of this object from an XML stream.
 void setPreferredLatitude(int newPreferredLatitude)
          Set the PreferredLatitude value.
 void setRefNation(Nation newRefNation)
          Set the RefNation value.
 void setSelectable(boolean newSelectable)
          Set the Selectable value.
 void setStartsOnEastCoast(boolean newStartsOnEastCoast)
          Set the StartsOnEastCoast value.
 void setType(NationType newType)
          Set the Type value.
 boolean startsOnEastCoast()
          Get the StartsOnEastCoast value.
protected  void toXMLImpl(javax.xml.stream.XMLStreamWriter out)
          Makes an XML-representation of this object.
protected  void writeAttributes(javax.xml.stream.XMLStreamWriter out)
          Write the attributes 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, readChild, readChildren, setAbstractType, setFeatureContainer, setIndex, setModifierIndex, toString, toXMLImpl, writeChildren
 
Methods inherited from class net.sf.freecol.common.model.FreeColObject
addPropertyChangeListener, addPropertyChangeListener, dumpObject, fireIndexedPropertyChange, fireIndexedPropertyChange, fireIndexedPropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getAttribute, getAttribute, getAttribute, getAttribute, getAttribute, getId, getPropertyChangeListeners, getPropertyChangeListeners, getSpecification, hasAttribute, hasListeners, readAttributes, readChild, readChildren, readFromArrayElement, readFromArrayElement, readFromListElement, readFromXML, readFromXMLElement, readFromXMLImpl, readFromXMLImpl, readFromXMLPartialImpl, removePropertyChangeListener, removePropertyChangeListener, save, save, setId, setSpecification, toXML, toXML, toXML, toXMLElement, toXMLElement, toXMLElement, toXMLElement, toXMLElementPartial, toXMLPartialImpl, writeAttribute
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

UNKNOWN_NATION_ID

public static java.lang.String UNKNOWN_NATION_ID

EUROPEAN_NATIONS

public static final java.lang.String[] EUROPEAN_NATIONS

type

private NationType type
Describe type here.


selectable

private boolean selectable
Describe selectable here.


refNation

private Nation refNation
Describe refNation here.


preferredLatitude

private int preferredLatitude
Describe preferredLatitude here.


startsOnEastCoast

private boolean startsOnEastCoast
Describe startsOnEastCoast here.

Constructor Detail

Nation

public Nation(java.lang.String id,
              Specification specification)
Method Detail

getType

public final NationType getType()
Get the Type value.

Returns:
a NationType value

setType

public final void setType(NationType newType)
Set the Type value.

Parameters:
newType - The new Type value.

getRulerNameKey

public final java.lang.String getRulerNameKey()
Get the RulerName value.

Returns:
a String value

isSelectable

public final boolean isSelectable()
Get the Selectable value.

Returns:
a boolean value

getRefNation

public final Nation getRefNation()
Get the RefNation value.

Returns:
a Nation value

setRefNation

public final void setRefNation(Nation newRefNation)
Set the RefNation value.

Parameters:
newRefNation - The new RefNation value.

setSelectable

public final void setSelectable(boolean newSelectable)
Set the Selectable value.

Parameters:
newSelectable - The new Selectable value.

getPreferredLatitude

public final int getPreferredLatitude()
Get the PreferredLatitude value.

Returns:
an int value

setPreferredLatitude

public final void setPreferredLatitude(int newPreferredLatitude)
Set the PreferredLatitude value.

Parameters:
newPreferredLatitude - The new PreferredLatitude value.

startsOnEastCoast

public final boolean startsOnEastCoast()
Get the StartsOnEastCoast value.

Returns:
a boolean value

setStartsOnEastCoast

public final void setStartsOnEastCoast(boolean newStartsOnEastCoast)
Set the StartsOnEastCoast value.

Parameters:
newStartsOnEastCoast - The new StartsOnEastCoast value.

toXMLImpl

protected void toXMLImpl(javax.xml.stream.XMLStreamWriter out)
                  throws javax.xml.stream.XMLStreamException
Makes an XML-representation of this object.

Overrides:
toXMLImpl in class FreeColGameObjectType
Parameters:
out - The output stream.
Throws:
javax.xml.stream.XMLStreamException - if there are any problems writing to the stream.

writeAttributes

protected void writeAttributes(javax.xml.stream.XMLStreamWriter out)
                        throws javax.xml.stream.XMLStreamException
Write the attributes of this object to a stream.

Overrides:
writeAttributes in class FreeColObject
Parameters:
out - The target stream.
Throws:
javax.xml.stream.XMLStreamException - if there are any problems writing to the stream.

readAttributes

protected void readAttributes(javax.xml.stream.XMLStreamReader in)
                       throws javax.xml.stream.XMLStreamException
Reads the attributes of this object from an XML stream.

Overrides:
readAttributes in class FreeColGameObjectType
Parameters:
in - The XML input stream.
Throws:
javax.xml.stream.XMLStreamException - if a problem was encountered during parsing.

getXMLElementTagName

public static java.lang.String getXMLElementTagName()
Returns the tag name of the root element representing this object.

Returns:
"nation".