esmska.data.event
Class ValuedEvent<E extends java.lang.Enum<E>,V>

java.lang.Object
  extended by java.util.EventObject
      extended by esmska.data.event.ValuedEvent<E,V>
Type Parameters:
E - Enum describing the possible event types
V - Type of associated value
All Implemented Interfaces:
java.io.Serializable

public class ValuedEvent<E extends java.lang.Enum<E>,V>
extends java.util.EventObject

An event which carries a value. The value may be null (check the description of the particular event).

See Also:
Serialized Form

Field Summary
protected  E event
           
protected  V value
           
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
ValuedEvent(java.lang.Object source, E event, V value)
          Constructs a new ValuedEvent.
 
Method Summary
 E getEvent()
          Get the event type
 V getValue()
          Get the associated value.
 
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

event

protected E extends java.lang.Enum<E> event

value

protected V value
Constructor Detail

ValuedEvent

public ValuedEvent(java.lang.Object source,
                   E event,
                   V value)
Constructs a new ValuedEvent.

Parameters:
source - the object that originated the event, not null
event - enum value determining type of event, not null
value - value associated with the event, may be null
Method Detail

getEvent

public E getEvent()
Get the event type


getValue

public V getValue()
Get the associated value. May be null.