|
|||||||||
| 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.StringTemplate
net.sf.freecol.common.model.HistoryEvent
public class HistoryEvent
| Nested Class Summary | |
|---|---|
static class |
HistoryEvent.EventType
|
| Nested classes/interfaces inherited from class net.sf.freecol.common.model.StringTemplate |
|---|
StringTemplate.TemplateType |
| Field Summary | |
|---|---|
private HistoryEvent.EventType |
eventType
The type of event. |
private Turn |
turn
The turn in which the event took place |
| 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 | |
|---|---|
HistoryEvent()
|
|
HistoryEvent(Turn turn,
HistoryEvent.EventType eventType)
|
|
| Method Summary | |
|---|---|
HistoryEvent |
add(java.lang.String key,
java.lang.String value)
Add a new key and replacement to the HistoryEvent. |
HistoryEvent |
addAmount(java.lang.String key,
int amount)
Add a key and an integer value to replace it to this StringTemplate. |
HistoryEvent |
addName(java.lang.String key,
java.lang.String value)
Add a new key and replacement to the HistoryEvent. |
HistoryEvent |
addStringTemplate(java.lang.String key,
StringTemplate template)
Add a key and a StringTemplate to replace it to this StringTemplate. |
HistoryEvent.EventType |
getEventType()
Get the EventType value. |
Turn |
getTurn()
Get the int 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 |
setEventType(HistoryEvent.EventType newEventType)
Set the EventType value. |
void |
setTurn(Turn newInt)
Set the int value. |
java.lang.String |
toString()
Builds a string representation of this object. |
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.StringTemplate |
|---|
add, addAmount, addName, addName, addStringTemplate, equals, getDefaultId, getKeys, getReplacement, getReplacements, getTemplateType, hashCode, key, label, name, readAttributes, readChildren, setDefaultId, template, writeChildren |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private Turn turn
private HistoryEvent.EventType eventType
| Constructor Detail |
|---|
public HistoryEvent()
public HistoryEvent(Turn turn,
HistoryEvent.EventType eventType)
| Method Detail |
|---|
public final Turn getTurn()
int value.
int valuepublic final void setTurn(Turn newInt)
int value.
newInt - The new int value.public final HistoryEvent.EventType getEventType()
EventType value.
EventType valuepublic final void setEventType(HistoryEvent.EventType newEventType)
EventType value.
newEventType - The new EventType value.
public HistoryEvent add(java.lang.String key,
java.lang.String value)
add in class StringTemplatekey - a String valuevalue - a String value
HistoryEvent value
public HistoryEvent addName(java.lang.String key,
java.lang.String value)
addName in class StringTemplatekey - a String valuevalue - a String value
HistoryEvent value
public HistoryEvent addAmount(java.lang.String key,
int amount)
key - a String valueamount - an int value
HistoryEvent value
public HistoryEvent addStringTemplate(java.lang.String key,
StringTemplate template)
addStringTemplate in class StringTemplatekey - a String valuetemplate - a StringTemplate value
HistoryEvent value
protected void toXMLImpl(javax.xml.stream.XMLStreamWriter out)
throws javax.xml.stream.XMLStreamException
toXMLImpl in class StringTemplateout - The target stream.
javax.xml.stream.XMLStreamException - if there are any problems writing
to the stream.
protected void writeAttributes(javax.xml.stream.XMLStreamWriter out)
throws javax.xml.stream.XMLStreamException
writeAttributes in class StringTemplateout - The target stream.
javax.xml.stream.XMLStreamException - if there are any problems writing
to the stream.
protected void readFromXMLImpl(javax.xml.stream.XMLStreamReader in)
throws javax.xml.stream.XMLStreamException
readFromXMLImpl in class FreeColObjectin - The input stream with the XML.
javax.xml.stream.XMLStreamException - if a problem was encountered
during parsing.public java.lang.String toString()
toString in class StringTemplatepublic static java.lang.String getXMLElementTagName()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||