next up previous
Next: Populations Up: Entities and Events Previous: Querying an event class

Extracting data with derived events

The data in derived events is available by using a dynamic cast:

  Event ev = el.elementAt(i);
  ClassID evclass = ev.getClassID();
  if (evclass == morphologyEventID) {
    MorphologyEvent mev = (MorphologyEvent) ev;
    // can now use methods of morphology event, e.g. mev.getStructure() 

Fred Howell