Package me.wouterkistemaker.eventmanager
Class Event
java.lang.Object
me.wouterkistemaker.eventmanager.Event
- All Implemented Interfaces:
Handleable
The default implementation of
Handleable
. Events can be called to an event manager
in order to be processed by listeners.- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
Event()
Creates a new event with no specified cause.protected
Event
(Handleable cause) Creates a new event. -
Method Summary
-
Field Details
-
cause
The cause of this event.- Since:
- 1.1
-
-
Constructor Details
-
Event
protected Event()Creates a new event with no specified cause. -
Event
Creates a new event.- Parameters:
cause
- The cause of this event- Since:
- 1.1
-
-
Method Details
-
getCause
Returns the cause of this event. If no cause is specified, this will returnnull
.- Specified by:
getCause
in interfaceHandleable
- Returns:
- The cause of this event if specified,
null
otherwise - Since:
- 1.1
-
getName
This method allows you to get the name of theEvent
This can be overridden by a superclass, but preferably not because this would cause events being named quite differently from another
Event
!- Returns:
String
name of theEvent
-
getDescription
- Returns:
String
the description of theEvent
-