de.fhg.igd.event
Class Event

java.lang.Object
  extended by de.fhg.igd.event.Event
All Implemented Interfaces:
Implication, Serializable
Direct Known Subclasses:
TimeoutEvent

public class Event
extends Object
implements Implication, Serializable

The root class for all events in the SeMoA system. Works well together with the generic EventListener class. Checking whether a particular event happened is done by verifying that the event which occured implies the event which is expected via the implies method.

Programming example:
A program verifies that event a occured when an event b was observed by evaluating

b.implies(a)

This class checks implication based on class inheritance. Hence, b implies a iff the class of b is a subclass of (or equal to) the class of a.

Version:
$Id: Event.java 1913 2007-08-08 02:41:53Z jpeters $
Author:
Volker Roth
See Also:
EventReflector, Serialized Form

Field Summary
 long millis
          The creation date of the event.
 
Constructor Summary
Event()
          Creates an Event.
 
Method Summary
 boolean implies(Object event)
          Checks whether this event implies the given one.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

millis

public final long millis
The creation date of the event.

Constructor Detail

Event

public Event()
Creates an Event.

Method Detail

implies

public boolean implies(Object event)
Checks whether this event implies the given one. This event implies the given one iff this event's class is a specialization (subclass) of the given event's class or is the same class.

Specified by:
implies in interface Implication
Parameters:
event - The event which is to be tested for implication.
Returns:
true if this event implies the given one.


Copyright © Fraunhofer Gesellschaft. All Rights Reserved.