private abstract static class ChangeSet.Change
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected ChangeSet.See |
see
The visibility of the change.
|
Constructor and Description |
---|
Change(ChangeSet.See see)
Make a new Change.
|
Modifier and Type | Method and Description |
---|---|
abstract void |
attachToElement(org.w3c.dom.Element element)
Some changes can not be directly specialized, but need to be
directly attached to an element.
|
java.util.List<ChangeSet.Change> |
consequences(ServerPlayer serverPlayer)
Are the secondary changes consequent to this Change?
|
boolean |
convertsToElement()
Can this Change be directly converted to an Element?
|
abstract int |
getPriority()
Gets the sort priority of a change, to be used by the
changeComparator.
|
boolean |
isNotifiable(ServerPlayer serverPlayer)
Should a player be notified of this Change?
|
boolean |
isPerhapsNotifiable(ServerPlayer serverPlayer)
Should a player be notified of a Change for which the
visibility is delegated to the change type, allowing
special change-specific overrides.
|
boolean |
matches(FreeColGameObject fcgo)
Does this Change operate on the given object?
|
abstract org.w3c.dom.Element |
toElement(ServerPlayer serverPlayer,
org.w3c.dom.Document doc)
Specialize a Change for a particular player.
|
protected final ChangeSet.See see
public Change(ChangeSet.See see)
public boolean matches(FreeColGameObject fcgo)
fcgo
- The FreeColGameObject
to check.public abstract int getPriority()
public boolean isNotifiable(ServerPlayer serverPlayer)
serverPlayer
- The ServerPlayer
to consider.Change
should be sent.public boolean isPerhapsNotifiable(ServerPlayer serverPlayer)
serverPlayer
- The ServerPlayer
to consider.public java.util.List<ChangeSet.Change> consequences(ServerPlayer serverPlayer)
serverPlayer
- The ServerPlayer
to consider.Change
s or the
empty list if there are none, which is usually the case.public boolean convertsToElement()
public abstract org.w3c.dom.Element toElement(ServerPlayer serverPlayer, org.w3c.dom.Document doc)
serverPlayer
- The ServerPlayer
to update.doc
- The owner Document
to build the element in.Element
encapsulating this change.public abstract void attachToElement(org.w3c.dom.Element element)
element
- The Element
to attach to.