Class EventType<T>

java.lang.Object
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 (fr, 27 nov 2009) $
  • Field Details

    • id

      private final String id
  • Constructor Details

    • EventType

      public EventType​(String id)
      Create a new event type object.
  • Method Details