Event
Leave feedback
On this page
Inheritance: java.lang.Object
public abstract class Event<T>
This class is intended to be inherited when subscribing to events.
| Constructor | Description |
|---|---|
| Event() | Initializes a new instance of the Event class. |
| Method | Description |
|---|---|
| add(T delegate) | Adds a listener for the event. |
| remove(T delegate) | Removes a listener for the event. |
| isEmpty() | Checks for presence of at least one listener. |
public Event()
Initializes a new instance of the Event class.
public final synchronized void add(T delegate)
Adds a listener for the event.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| delegate | T | A listener for the event to add. |
public final synchronized void remove(T delegate)
Removes a listener for the event.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| delegate | T | A listener for the event to remove. |
public synchronized boolean isEmpty()
Checks for presence of at least one listener.
Returns: boolean - A value indicating that at least one listener added for the event.
Was this page helpful?
Any additional feedback you'd like to share with us?
Please tell us how we can improve this page.
Thank you for your feedback!
We value your opinion. Your feedback will help us improve our documentation.