org.mars_sim.msp.simulation
Class UnitEvent

java.lang.Object
  extended by java.util.EventObject
      extended by org.mars_sim.msp.simulation.UnitEvent
All Implemented Interfaces:
java.io.Serializable

public class UnitEvent
extends java.util.EventObject

A unit change event.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
UnitEvent(Unit source, java.lang.String type, java.lang.Object target)
          Constructor
 
Method Summary
 java.lang.Object getTarget()
          Gets the target object of the event.
 java.lang.String getType()
          Gets the type of event.
 java.lang.String toString()
          Override toString() method.
 
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

UnitEvent

public UnitEvent(Unit source,
                 java.lang.String type,
                 java.lang.Object target)
Constructor

Parameters:
source - the object throwing the event.
type - the type of event.
Method Detail

getType

public java.lang.String getType()
Gets the type of event.

Returns:
event type

getTarget

public java.lang.Object getTarget()
Gets the target object of the event.

Returns:
target object or null if none.

toString

public java.lang.String toString()
Override toString() method.

Overrides:
toString in class java.util.EventObject