Class UnitChangeEvent

  • All Implemented Interfaces:
    java.io.Serializable

    public class UnitChangeEvent
    extends TimeStampedEvent
    An event representing a change to a unit
    Author:
    stm
    See Also:
    Serialized Form
    • Field Summary

      • Fields inherited from class java.util.EventObject

        source
    • Constructor Summary

      Constructors 
      Constructor Description
      UnitChangeEvent​(java.lang.Object source, Unit u, java.lang.Object cause)
      Creates a new event for a unit.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Object getCause()
      Returns the value of cause.
      Unit getUnit()  
      java.lang.String toString()  
      • Methods inherited from class java.util.EventObject

        getSource
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • UnitChangeEvent

        public UnitChangeEvent​(java.lang.Object source,
                               Unit u,
                               java.lang.Object cause)
        Creates a new event for a unit.
        Parameters:
        source - The object responsible for the change
        u - The changed unit
        cause - A reason that caused this event. Listeners may want to react only once to all events with the same cause.
    • Method Detail

      • getUnit

        public Unit getUnit()
        Returns:
        The unit that has changed
      • getCause

        public java.lang.Object getCause()
        Returns the value of cause.
        Returns:
        Returns cause.