private static class ChangeSet.FeatureChange extends ChangeSet.Change
Modifier and Type | Field and Description |
---|---|
private boolean |
add |
private Feature |
feature |
private FreeColGameObject |
object |
see
Constructor and Description |
---|
FeatureChange(ChangeSet.See see,
FreeColGameObject object,
Feature feature,
boolean add)
Build a new FeatureChange.
|
Modifier and Type | Method and Description |
---|---|
void |
attachToElement(org.w3c.dom.Element element)
Some changes can not be directly specialized, but need to be
directly attached to an element.
|
int |
getPriority()
Gets the sort priority.
|
org.w3c.dom.Element |
toElement(ServerPlayer serverPlayer,
org.w3c.dom.Document doc)
Specialize a feature change into an element for a
particular player.
|
java.lang.String |
toString() |
consequences, convertsToElement, isNotifiable, isPerhapsNotifiable, matches
private final FreeColGameObject object
private final Feature feature
private final boolean add
public FeatureChange(ChangeSet.See see, FreeColGameObject object, Feature feature, boolean add)
see
- The visibility of this change.object
- The FreeColGameObject
to update.feature
- a Feature
value to add or remove.add
- a boolean
valuepublic int getPriority()
getPriority
in class ChangeSet.Change
public org.w3c.dom.Element toElement(ServerPlayer serverPlayer, org.w3c.dom.Document doc)
toElement
in class ChangeSet.Change
serverPlayer
- The ServerPlayer
to update.doc
- The owner Document
.public void attachToElement(org.w3c.dom.Element element)
attachToElement
in class ChangeSet.Change
element
- The Element
to attach to.public java.lang.String toString()
toString
in class java.lang.Object