net.sf.freecol.common.model
Class HighScore

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

public class HighScore
extends FreeColObject


Nested Class Summary
static class HighScore.Level
          On retirement, an object will be named in honour of the player.
 
Field Summary
private  int colonies
          The final number of colonies.
private  java.util.Date date
          Describe date here.
private static java.text.SimpleDateFormat dateFormat
           
private  java.lang.String difficulty
          The difficulty level of this game.
private  int independenceTurn
          The turn in which independence was granted.
private  HighScore.Level level
          Describe level here.
private  java.lang.String nationID
          Describe nationID here.
private  java.lang.String nationName
          The name given to the new independent nation.
private  java.lang.String nationTypeID
          Describe nationTypeID here.
private  java.lang.String newLandName
          Describe newLandName here.
private  java.lang.String playerName
          The name of the human player.
private  int retirementTurn
          Retirement Game year
private  int score
          Describe score here.
private  int units
          The final number of units.
 
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
HighScore(org.w3c.dom.Element element)
           
HighScore(Player player, java.util.Date theDate)
           
HighScore(javax.xml.stream.XMLStreamReader in)
           
 
Method Summary
 int getColonies()
          Get the Colonies value.
 java.util.Date getDate()
          Get the Date value.
 java.lang.String getDifficulty()
          Get the Difficulty value.
 int getIndependenceTurn()
          Get the IndependenceTurn value.
 HighScore.Level getLevel()
          Get the Level value.
 java.lang.String getNationID()
          Get the NationID value.
 java.lang.String getNationName()
          Get the NationName value.
 java.lang.String getNationTypeID()
          Get the NationTypeID value.
 java.lang.String getNewLandName()
          Get the NewLandName value.
 java.lang.String getOldNationNameKey()
          Get the Nation's localized name.
 java.lang.String getPlayerName()
          Get the PlayerName value.
 int getRetirementTurn()
          Get the RetirementTurn value.
 int getScore()
          Get the Score value.
 int getUnits()
          Get the Units value.
static java.lang.String getXMLElementTagName()
          Returns the tag name of the root element representing this object.
protected  void readFromXMLImpl(javax.xml.stream.XMLStreamReader in)
          Initialize this object from an XML-representation of this object.
 void setColonies(int newColonies)
          Set the Colonies value.
 void setDate(java.util.Date newDate)
          Set the Date value.
 void setDifficulty(java.lang.String newDifficulty)
          Set the Difficulty value.
 void setIndependenceTurn(int newIndependenceTurn)
          Set the IndependenceTurn value.
 void setLevel(HighScore.Level newLevel)
          Set the Level value.
 void setNationID(java.lang.String newNationID)
          Set the NationID value.
 void setNationName(java.lang.String newNationName)
          Set the NationName value.
 void setNationTypeID(java.lang.String newNationTypeID)
          Set the NationTypeID value.
 void setNewLandName(java.lang.String newNewLandName)
          Set the NewLandName value.
 void setPlayerName(java.lang.String newPlayerName)
          Set the PlayerName value.
 void setRetirementTurn(int newRetirementTurn)
          Set the RetirementTurn value.
 void setScore(int newScore)
          Set the Score value.
 void setUnits(int newUnits)
          Set the Units value.
protected  void toXMLImpl(javax.xml.stream.XMLStreamWriter out)
          This method writes an XML-representation of this object to the given stream.
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.FreeColObject
addPropertyChangeListener, addPropertyChangeListener, dumpObject, fireIndexedPropertyChange, fireIndexedPropertyChange, fireIndexedPropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getAttribute, getAttribute, getAttribute, getAttribute, getAttribute, getId, getPropertyChangeListeners, getPropertyChangeListeners, getSpecification, hasAbility, hasAttribute, hasListeners, readAttributes, readAttributes, readChild, readChild, readChildren, readChildren, readFromArrayElement, readFromArrayElement, readFromListElement, readFromXML, readFromXMLElement, readFromXMLImpl, readFromXMLPartialImpl, removePropertyChangeListener, removePropertyChangeListener, save, save, setId, setSpecification, toXML, toXML, toXML, toXMLElement, toXMLElement, toXMLElement, toXMLElement, toXMLElementPartial, toXMLPartialImpl, writeAttribute, writeChildren
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

dateFormat

private static final java.text.SimpleDateFormat dateFormat

independenceTurn

private int independenceTurn
The turn in which independence was granted.


playerName

private java.lang.String playerName
The name of the human player.


nationID

private java.lang.String nationID
Describe nationID here.


nationTypeID

private java.lang.String nationTypeID
Describe nationTypeID here.


score

private int score
Describe score here.


level

private HighScore.Level level
Describe level here.


nationName

private java.lang.String nationName
The name given to the new independent nation.


difficulty

private java.lang.String difficulty
The difficulty level of this game.


units

private int units
The final number of units.


colonies

private int colonies
The final number of colonies.


newLandName

private java.lang.String newLandName
Describe newLandName here.


date

private java.util.Date date
Describe date here.


retirementTurn

private int retirementTurn
Retirement Game year

Constructor Detail

HighScore

public HighScore(Player player,
                 java.util.Date theDate)

HighScore

public HighScore(javax.xml.stream.XMLStreamReader in)
          throws javax.xml.stream.XMLStreamException
Throws:
javax.xml.stream.XMLStreamException

HighScore

public HighScore(org.w3c.dom.Element element)
          throws javax.xml.stream.XMLStreamException
Throws:
javax.xml.stream.XMLStreamException
Method Detail

getIndependenceTurn

public final int getIndependenceTurn()
Get the IndependenceTurn value.

Returns:
an int value

setIndependenceTurn

public final void setIndependenceTurn(int newIndependenceTurn)
Set the IndependenceTurn value.

Parameters:
newIndependenceTurn - The new IndependenceTurn value.

getRetirementTurn

public final int getRetirementTurn()
Get the RetirementTurn value.

Returns:
an int value

setRetirementTurn

public final void setRetirementTurn(int newRetirementTurn)
Set the RetirementTurn value.

Parameters:
newRetirementTurn - The new RetirementTurn value.

getPlayerName

public final java.lang.String getPlayerName()
Get the PlayerName value.

Returns:
a String value

setPlayerName

public final void setPlayerName(java.lang.String newPlayerName)
Set the PlayerName value.

Parameters:
newPlayerName - The new PlayerName value.

getNationID

public final java.lang.String getNationID()
Get the NationID value.

Returns:
a String value

setNationID

public final void setNationID(java.lang.String newNationID)
Set the NationID value.

Parameters:
newNationID - The new NationID value.

getNationTypeID

public final java.lang.String getNationTypeID()
Get the NationTypeID value.

Returns:
a String value

setNationTypeID

public final void setNationTypeID(java.lang.String newNationTypeID)
Set the NationTypeID value.

Parameters:
newNationTypeID - The new NationTypeID value.

getScore

public final int getScore()
Get the Score value.

Returns:
an int value

setScore

public final void setScore(int newScore)
Set the Score value.

Parameters:
newScore - The new Score value.

getLevel

public final HighScore.Level getLevel()
Get the Level value.

Returns:
a Level value

setLevel

public final void setLevel(HighScore.Level newLevel)
Set the Level value.

Parameters:
newLevel - The new Level value.

getOldNationNameKey

public final java.lang.String getOldNationNameKey()
Get the Nation's localized name.

Returns:
a String value

getNationName

public final java.lang.String getNationName()
Get the NationName value.

Returns:
a String value

setNationName

public final void setNationName(java.lang.String newNationName)
Set the NationName value.

Parameters:
newNationName - The new NationName value.

getNewLandName

public final java.lang.String getNewLandName()
Get the NewLandName value.

Returns:
a String value

setNewLandName

public final void setNewLandName(java.lang.String newNewLandName)
Set the NewLandName value.

Parameters:
newNewLandName - The new NewLandName value.

getDifficulty

public final java.lang.String getDifficulty()
Get the Difficulty value.

Returns:
a String value

setDifficulty

public final void setDifficulty(java.lang.String newDifficulty)
Set the Difficulty value.

Parameters:
newDifficulty - The new Difficulty value.

getUnits

public final int getUnits()
Get the Units value.

Returns:
an int value

setUnits

public final void setUnits(int newUnits)
Set the Units value.

Parameters:
newUnits - The new Units value.

getColonies

public final int getColonies()
Get the Colonies value.

Returns:
an int value

setColonies

public final void setColonies(int newColonies)
Set the Colonies value.

Parameters:
newColonies - The new Colonies value.

getDate

public final java.util.Date getDate()
Get the Date value.

Returns:
a Date value

setDate

public final void setDate(java.util.Date newDate)
Set the Date value.

Parameters:
newDate - The new Date value.

toXMLImpl

protected void toXMLImpl(javax.xml.stream.XMLStreamWriter out)
                  throws javax.xml.stream.XMLStreamException
This method writes an XML-representation of this object to the given stream.

Specified by:
toXMLImpl in class FreeColObject
Parameters:
out - The target 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.

readFromXMLImpl

protected void readFromXMLImpl(javax.xml.stream.XMLStreamReader in)
                        throws javax.xml.stream.XMLStreamException
Initialize this object from an XML-representation of this object.

Overrides:
readFromXMLImpl in class FreeColObject
Parameters:
in - The input stream with the XML.
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:
"highScore".