|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mars_sim.msp.core.events.HistoricalEvent
public abstract class HistoricalEvent
This class represents a time based event that has occuried in the simulation. It is aimed at being subclassed to reflect the real simulation specific events. An event consists of a time stamp when it occured, a description, an optional Unit that is the source of the event and an optional Object that has triggered the event.
| Constructor Summary | |
|---|---|
HistoricalEvent(String category,
String type,
Object source,
String description)
Construct an event with the appropriate information. |
|
| Method Summary | |
|---|---|
String |
getCategory()
|
String |
getDescription()
Get description. |
Object |
getSource()
Get the Unit source. |
MarsClock |
getTimestamp()
Get event time. |
String |
getType()
Get the type of event. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public HistoricalEvent(String category,
String type,
Object source,
String description)
category - Category of event.type - Type of event.source - The object that has produced the event, if this is null
then it is a global simulation event. It could be a Unit or a Building.description - Long description of event.HistoricalEventManager.registerNewEvent(HistoricalEvent)| Method Detail |
|---|
public String getDescription()
public Object getSource()
public MarsClock getTimestamp()
public String getType()
public String getCategory()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||