sky.monome.event
Class GenericEvent<T>

java.lang.Object
  extended by java.util.EventObject
      extended by sky.monome.event.GenericEvent<T>
Type Parameters:
T - Type of objects that create this type of events.
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
AnalogEvent, ButtonEvent, FrameEvent, SequencerEvent

public abstract class GenericEvent<T>
extends java.util.EventObject

Generic Monome event. This class is the base class for all Monome events.

Author:
PJ Skyman
See Also:
Serialized Form

Field Summary
protected  long when
          Time of this generic event, in milliseconds since the time zero of Unix world.
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
GenericEvent(long when, T source)
          Constructs a generic event with the specified date and the specified source.
 
Method Summary
 T getSource2()
          Returns the source of this generic event.
 long getWhen()
          Returns the time of this generic event, in milliseconds since the time zero of Unix world.
 
Methods inherited from class java.util.EventObject
getSource, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

when

protected final long when
Time of this generic event, in milliseconds since the time zero of Unix world.

Constructor Detail

GenericEvent

public GenericEvent(long when,
                    T source)
Constructs a generic event with the specified date and the specified source.

Parameters:
when - Time of this generic event, in milliseconds since the time zero of Unix world.
source - Source of this generic event.
Method Detail

getWhen

public long getWhen()
Returns the time of this generic event, in milliseconds since the time zero of Unix world.

Returns:
The time of this generic event, in milliseconds since the time zero of Unix world.

getSource2

public T getSource2()
Returns the source of this generic event. The source is typed with the right type.

Returns:
The source of this generic event.