org.drools.examples.broker.events
Class EventImpl<T>

java.lang.Object
  extended by org.drools.examples.broker.events.EventImpl<T>
All Implemented Interfaces:
Event<T>

public class EventImpl<T>
extends Object
implements Event<T>

A default implementation for Event


Constructor Summary
EventImpl(long timestamp, T object)
           
 
Method Summary
 Date getDate()
          This is the same as getTimestamp, but returns a Date object instead
 T getObject()
          Returns this event's actual object
 long getTimestamp()
          Returns the timestamp from this event
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

EventImpl

public EventImpl(long timestamp,
                 T object)
Method Detail

getTimestamp

public long getTimestamp()
Description copied from interface: Event
Returns the timestamp from this event

Specified by:
getTimestamp in interface Event<T>
Returns:

getObject

public T getObject()
Description copied from interface: Event
Returns this event's actual object

Specified by:
getObject in interface Event<T>
Returns:

getDate

public Date getDate()
Description copied from interface: Event
This is the same as getTimestamp, but returns a Date object instead

Specified by:
getDate in interface Event<T>
Returns:

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2001-2012 JBoss by Red Hat. All Rights Reserved.