public abstract class AbstractEvent extends java.lang.Object implements BladeEvent
registerEventFieldLabels(String, String[], EventFactory)
,
Serialized FormModifier and Type | Field and Description |
---|---|
protected long |
date |
static java.lang.String |
DEFAULT_SEPARATOR |
Constructor and Description |
---|
AbstractEvent() |
AbstractEvent(long date) |
Modifier and Type | Method and Description |
---|---|
int |
compareTo(java.lang.Object obj)
The order is based on dates.
|
long |
getDate() |
static EventFactory |
getEventFactory(java.lang.String event_label) |
static java.lang.String[] |
getEventFieldLabels(java.lang.String event_label)
Get field labels of a given event type.
|
protected static void |
registerEventFieldLabels(java.lang.String event_label,
java.lang.String[] field_labels,
EventFactory factory)
Registers the given event type label (which must be unique) and associates the fields
labels for this event type.
|
void |
setDate(long date) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getFieldLabels, getFieldValue, getTypeLabel, toString
public static final java.lang.String DEFAULT_SEPARATOR
protected long date
public AbstractEvent()
public AbstractEvent(long date)
protected static void registerEventFieldLabels(java.lang.String event_label, java.lang.String[] field_labels, EventFactory factory)
event_label
- the unique label designating this event typefield_labels
- the array of field labels, describing the content of each field
this type of event holds. These labels must be in the same order as the fields are
printed when the toString() method is called on this type of event.BladeEvent.toString(long, String)
public static java.lang.String[] getEventFieldLabels(java.lang.String event_label)
event_label
- label of the event typepublic static EventFactory getEventFactory(java.lang.String event_label)
public long getDate()
getDate
in interface BladeEvent
public void setDate(long date)
public int compareTo(java.lang.Object obj) throws java.lang.ClassCastException
compareTo
in interface java.lang.Comparable<java.lang.Object>
java.lang.ClassCastException