nl.tudelft.simulation.event
Class Event

java.lang.Object
  extended by nl.tudelft.simulation.event.Event
All Implemented Interfaces:
Serializable, EventInterface
Direct Known Subclasses:
TimedEvent

public class Event
extends Object
implements EventInterface

The Event class forms the reference implementation for the EventInterface.

(c) copyright 2002-2005 Delft University of Technology , the Netherlands.

See for project information www.simulation.tudelft.nl/event
License of use: Lesser General Public License (LGPL) , no warranty

Since:
1.4
Version:
$Revision: 1.1 $ $Date: 2007/01/06 13:24:35 $
Author:
Peter Jacobs
See Also:
Serialized Form

Field Summary
protected  Object content
          content refers to the content of the event
protected  Object source
          the source of an event
protected  EventType type
          type is the type of the event
 
Constructor Summary
Event(EventType type, Object source, Object content)
          constructs a new Event.
 
Method Summary
 Object getContent()
          returns the content of this event.
 Object getSource()
          returns the source of the event.
 EventType getType()
          returns the type of the event.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

type

protected EventType type
type is the type of the event


content

protected Object content
content refers to the content of the event


source

protected Object source
the source of an event

Constructor Detail

Event

public Event(EventType type,
             Object source,
             Object content)
constructs a new Event.

Parameters:
type - the name of the Event.
source - the source of the sender.
content - the content of the event.
Method Detail

getSource

public Object getSource()
Description copied from interface: EventInterface
returns the source of the event. The source is the sender of the event

Specified by:
getSource in interface EventInterface
Returns:
the source of the event
See Also:
EventInterface.getSource()

getContent

public Object getContent()
Description copied from interface: EventInterface
returns the content of this event.

Specified by:
getContent in interface EventInterface
Returns:
the content of this event
See Also:
EventInterface.getContent()

getType

public EventType getType()
Description copied from interface: EventInterface
returns the type of the event.

Specified by:
getType in interface EventInterface
Returns:
the eventType of the event
See Also:
EventInterface.getType()

toString

public String toString()
Overrides:
toString in class Object
See Also:
Object.toString()


Copyright © 2002-2011 Delft University of Technology, the Netherlands. All Rights Reserved.