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

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

private static class ChangeSet.RemoveChange
extends ChangeSet.Change


Field Summary
private  java.util.List<FreeColGameObject> contents
           
private  FreeColGameObject fcgo
           
private  Tile tile
           
 
Fields inherited from class net.sf.freecol.server.control.ChangeSet.Change
see
 
Constructor Summary
ChangeSet.RemoveChange(ChangeSet.See see, Location loc, java.util.List<FreeColGameObject> objects)
          Build a new RemoveChange for an object that is disposed.
 
Method Summary
 boolean isPerhapsNotifiable(ServerPlayer serverPlayer)
          Should a player perhaps be notified of this removal? They should if they can see the tile, and there is no other-player settlement present.
 int sortPriority()
          The sort priority.
 org.w3c.dom.Element toElement(ServerPlayer serverPlayer, org.w3c.dom.Document doc)
          Specialize a RemoveChange to a particular player.
 
Methods inherited from class net.sf.freecol.server.control.ChangeSet.Change
attachToElement, consequences, convertsToElement, isNotifiable
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

tile

private Tile tile

fcgo

private FreeColGameObject fcgo

contents

private java.util.List<FreeColGameObject> contents
Constructor Detail

ChangeSet.RemoveChange

ChangeSet.RemoveChange(ChangeSet.See see,
                       Location loc,
                       java.util.List<FreeColGameObject> objects)
Build a new RemoveChange for an object that is disposed.

Parameters:
see - The visibility of this change.
loc - The Location where the object was.
objects - The FreeColGameObjects to remove.
Method Detail

sortPriority

public int sortPriority()
The sort priority.

Specified by:
sortPriority in class ChangeSet.Change
Returns:
"CHANGE_REMOVE"

isPerhapsNotifiable

public boolean isPerhapsNotifiable(ServerPlayer serverPlayer)
Should a player perhaps be notified of this removal? They should if they can see the tile, and there is no other-player settlement present.

Overrides:
isPerhapsNotifiable in class ChangeSet.Change
Parameters:
serverPlayer - The ServerPlayer to notify.
Returns:
True if the player should be notified.

toElement

public org.w3c.dom.Element toElement(ServerPlayer serverPlayer,
                                     org.w3c.dom.Document doc)
Specialize a RemoveChange to a particular player.

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