Class TimeEvent

java.lang.Object
java.util.EventObject
org.episteme.social.history.clock.TimeEvent
All Implemented Interfaces:
Serializable

public class TimeEvent extends EventObject
An event indicating a change or occurrence in a time simulation or tracking system. This is primarily used by the TimeServer to notify listeners of tick updates. * @version 1.1
Since:
1.0
Author:
Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
See Also:
  • Field Details

    • TIME_CHANGED

      public static final int TIME_CHANGED
      Type ID for a generic time change event.
      See Also:
  • Constructor Details

    • TimeEvent

      public TimeEvent(TimeServer source, Time time, int id)
      Constructs a new TimeEvent.
      Parameters:
      source - the server producing the event
      time - the chronological state
      id - type identifier
      Throws:
      NullPointerException - if source or time is null
  • Method Details

    • paramString

      public String paramString()
      Returns a string representation of the event type.
      Returns:
      a descriptive string for the event ID
    • getTimeServer

      public TimeServer getTimeServer()
      Returns the server that originated the event.
      Returns:
      the time server
    • getTime

      public Time getTime()
      Returns the time associated with the event.
      Returns:
      the time state
    • getID

      public int getID()
      Returns the event identifier.
      Returns:
      the type ID
    • toString

      public String toString()
      Overrides:
      toString in class EventObject