Package net.sf.freecol.common.networking
Class ChangeSet.Change<T extends Message>
- java.lang.Object
-
- net.sf.freecol.common.networking.ChangeSet.Change<T>
-
- Direct Known Subclasses:
ChangeSet.AttackChange,ChangeSet.AttributeChange,ChangeSet.FeatureChange,ChangeSet.MessageChange,ChangeSet.MoveChange,ChangeSet.ObjectChange,ChangeSet.PartialObjectChange,ChangeSet.PlayerChange,ChangeSet.RemoveChange,ChangeSet.SpyChange,ChangeSet.StanceChange
- Enclosing class:
- ChangeSet
public abstract static class ChangeSet.Change<T extends Message> extends java.lang.ObjectAbstract template for all types of Change.
-
-
Field Summary
Fields Modifier and Type Field Description protected ChangeSet.SeeseeThe visibility of the change.
-
Constructor Summary
Constructors Constructor Description Change(ChangeSet.See see)Make a new Change.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected ChangeSet.SeeCheckcheck(Player player)Check this changes visibility to a given player.ChangeSet.Changeconsequence(Player player)Are the secondary changes consequent to this Change?booleanisNotifiable(Player player)Should a player be notified of this Change? Override in subclasses with special cases.booleanmatches(FreeColGameObject fcgo)Does this Change operate on the given object?abstract TtoMessage(Player player)Specialize a Change for a particular player.
-
-
-
Field Detail
-
see
protected final ChangeSet.See see
The visibility of the change.
-
-
Constructor Detail
-
Change
public Change(ChangeSet.See see)
Make a new Change.- Parameters:
see- The visibility.
-
-
Method Detail
-
check
protected ChangeSet.SeeCheck check(Player player)
Check this changes visibility to a given player.- Parameters:
player- Theplayerto check.- Returns:
- The visibility result.
-
matches
public boolean matches(FreeColGameObject fcgo)
Does this Change operate on the given object?- Parameters:
fcgo- TheFreeColGameObjectto check.- Returns:
- True if the object is a subject of this change.
-
isNotifiable
public boolean isNotifiable(Player player)
Should a player be notified of this Change? Override in subclasses with special cases.- Parameters:
player- ThePlayerto consider.- Returns:
- True if this
Changeshould be sent.
-
consequence
public ChangeSet.Change consequence(Player player)
Are the secondary changes consequent to this Change?- Parameters:
player- ThePlayerto consider.- Returns:
- The consequent
Change, or null if none.
-
-