Class ChangeSet.Change<T extends Message>

    • 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 - The player to check.
        Returns:
        The visibility result.
      • matches

        public boolean matches​(FreeColGameObject fcgo)
        Does this Change operate on the given object?
        Parameters:
        fcgo - The FreeColGameObject to 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 - The Player to consider.
        Returns:
        True if this Change should be sent.
      • consequence

        public ChangeSet.Change consequence​(Player player)
        Are the secondary changes consequent to this Change?
        Parameters:
        player - The Player to consider.
        Returns:
        The consequent Change, or null if none.
      • toMessage

        public abstract T toMessage​(Player player)
        Specialize a Change for a particular player.
        Parameters:
        player - The Player to update.
        Returns:
        A specialized Message.