net.sf.freecol.server.control
Class ChangeSet.AttributeChange

java.lang.Object
  extended by net.sf.freecol.server.control.ChangeSet.Change
      extended by net.sf.freecol.server.control.ChangeSet.AttributeChange
Enclosing class:
ChangeSet

private static class ChangeSet.AttributeChange
extends ChangeSet.Change

Encapsulate an attribute change.


Field Summary
private  java.lang.String key
           
private  java.lang.String value
           
 
Fields inherited from class net.sf.freecol.server.control.ChangeSet.Change
see
 
Constructor Summary
ChangeSet.AttributeChange(ChangeSet.See see, java.lang.String key, java.lang.String value)
          Build a new AttributeChange.
 
Method Summary
 void attachToElement(org.w3c.dom.Element element)
          Tack attributes onto the element.
 boolean convertsToElement()
          AttributeChanges are tacked onto the final Element, not converted directly.
 int sortPriority()
          The sort priority.
 org.w3c.dom.Element toElement(ServerPlayer serverPlayer, org.w3c.dom.Document doc)
          We do not specialize AttributeChanges.
 
Methods inherited from class net.sf.freecol.server.control.ChangeSet.Change
consequences, isNotifiable, isPerhapsNotifiable
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

key

private java.lang.String key

value

private java.lang.String value
Constructor Detail

ChangeSet.AttributeChange

ChangeSet.AttributeChange(ChangeSet.See see,
                          java.lang.String key,
                          java.lang.String value)
Build a new AttributeChange.

Parameters:
see - The visibility of this change.
key - A key String.
value - The corresponding value as a String.
Method Detail

sortPriority

public int sortPriority()
The sort priority.

Specified by:
sortPriority in class ChangeSet.Change
Returns:
"CHANGE_ATTRIBUTE", attributes are special.

convertsToElement

public boolean convertsToElement()
AttributeChanges are tacked onto the final Element, not converted directly.

Overrides:
convertsToElement in class ChangeSet.Change
Returns:
false.

toElement

public org.w3c.dom.Element toElement(ServerPlayer serverPlayer,
                                     org.w3c.dom.Document doc)
We do not specialize AttributeChanges.

Specified by:
toElement in class ChangeSet.Change
Parameters:
serverPlayer - The ServerPlayer to update.
doc - The owner Document.
Returns:
Null.

attachToElement

public void attachToElement(org.w3c.dom.Element element)
Tack attributes onto the element.

Overrides:
attachToElement in class ChangeSet.Change
Parameters:
element - The Element to attach to.