2.17.2: 2011-06-17

net.sf.basedb.util.bfs
Class EventType<T>

java.lang.Object
  extended by net.sf.basedb.util.bfs.EventType<T>

public class EventType<T>
extends Object

Defines an event type that is sent in event notifications to event handlers. The parser that defines the event type is recommended to keep a public static final EventType ... constant for each event type it defines. Event handlers can then simply reference this constant to determine which event that was fired. Eg.

public void handleEvent(EventType eventType, Object eventData)
{
        if (eventType == Parser.PRE_DEFINED_TYPE_1)
        {
           // Do something
        }
        else if (eventType == Parser.PRE_DEFINED_TYPE_2)
        {
                // Do something else
        }
}

Version:
2.15
Author:
Nicklas
See Also:
EventHandler
Last modified
$Date: 2009-11-27 14:06:17 +0100 (Fri, 27 Nov 2009) $

Field Summary
private  String id
           
 
Constructor Summary
EventType(String id)
          Create a new event type object.
 
Method Summary
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

id

private final String id
Constructor Detail

EventType

public EventType(String id)
Create a new event type object.

Method Detail

toString

public String toString()
Overrides:
toString in class Object

2.17.2: 2011-06-17