public abstract class Event extends Object
public static final int ID = 1;
If no ID is defined then the SEP uses the class name to perform a dispatch,
generally this will be less efficient at runtime but is easier for the
developer at compile time. When class name is used, uniqueness is guaranteed
by the fully qualified class name in this case.
The efficiency of dispatch depends upon the target platform, so for some
targets class name dispatch may be more efficient.
An event can provide a filter field as either an int or a String, this allow
eventhandlers to filter the type of events they receive. The eventhandler
decides at compile time whether it will filter using Strings or integers.| Modifier and Type | Field and Description |
|---|---|
protected int |
filterId |
protected String |
filterString |
static int |
NO_ID
default ID for an event when the user does not explicitly set an ID.
|
| Constructor and Description |
|---|
Event() |
Event(int id) |
Event(int id,
int filterId) |
Event(int id,
int filterId,
String filterString) |
Event(int id,
String filterString) |
| Modifier and Type | Method and Description |
|---|---|
int |
eventId()
The unique int identifier for this event.
|
CharSequence |
filterCharSequence() |
int |
filterId()
The integer id of a filter for this event, can be used interchangeably
with filterString.
|
String |
filterString()
The String id of a filter for this event, can be used interchangeably
with filterId.
|
public static final int NO_ID
protected int filterId
protected String filterString
public Event()
public Event(int id)
public Event(int id,
int filterId)
public Event(int id,
String filterString)
public Event(int id,
int filterId,
String filterString)
public final int eventId()
public final int filterId()
public final String filterString()
public final CharSequence filterCharSequence()
Copyright © 2019. All rights reserved.