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

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

private static class ChangeSet.TrivialChange
extends ChangeSet.Change

Encapsulate trivial element, which will only have attributes apart from its name.


Field Summary
private  java.lang.String[] attributes
           
private  java.lang.String name
           
private  int priority
           
 
Fields inherited from class net.sf.freecol.server.control.ChangeSet.Change
see
 
Constructor Summary
ChangeSet.TrivialChange(ChangeSet.See see, java.lang.String name, int priority, java.lang.String[] attributes)
          Build a new TrivialChange.
 
Method Summary
 int sortPriority()
          The sort priority.
 org.w3c.dom.Element toElement(ServerPlayer serverPlayer, org.w3c.dom.Document doc)
          Specialize a TrivialChange into an element with the supplied name.
 
Methods inherited from class net.sf.freecol.server.control.ChangeSet.Change
attachToElement, consequences, convertsToElement, isNotifiable, isPerhapsNotifiable
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

priority

private int priority

name

private java.lang.String name

attributes

private java.lang.String[] attributes
Constructor Detail

ChangeSet.TrivialChange

ChangeSet.TrivialChange(ChangeSet.See see,
                        java.lang.String name,
                        int priority,
                        java.lang.String[] attributes)
Build a new TrivialChange.

Parameters:
see - The visibility of this change.
name - The name of the element.
priority - The sort priority of this change.
Method Detail

sortPriority

public int sortPriority()
The sort priority.

Specified by:
sortPriority in class ChangeSet.Change
Returns:
priority.

toElement

public org.w3c.dom.Element toElement(ServerPlayer serverPlayer,
                                     org.w3c.dom.Document doc)
Specialize a TrivialChange into an element with the supplied name.

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