CastEvent.AbstractCastEventListenerList, CastEvent.CastEventListener, CastEvent.CastEventListenerList, CastEvent.CastEventType, CastEvent.DefaultCastEvent<T>, CastEvent.SimpleCastEventListenerList, CastEvent.ThreadedCastEventListenerList| Modifier and Type | Field and Description |
|---|---|
protected T |
data
The event data
|
protected CastEvent.CastEventType |
eventType
|
| Constructor and Description |
|---|
DefaultCastEvent(CastEvent.CastEventType eventType,
T data)
Creates a new instance using the specified parameters.
|
| Modifier and Type | Method and Description |
|---|---|
T |
getData() |
<U> U |
getData(Class<U> cls)
Tries to cast the event data to the specified type and return it.
|
CastEvent.CastEventType |
getEventType() |
String |
toString() |
@Nonnull protected final CastEvent.CastEventType eventType
public DefaultCastEvent(@Nonnull CastEvent.CastEventType eventType, @Nullable T data)
eventType - the CastEvent.CastEventType.data - the event data or null.IllegalArgumentException - If eventType is
null.@Nonnull public CastEvent.CastEventType getEventType()
getEventType in interface CastEvent<T>CastEvent.CastEventType of this event.@Nullable public <U> U getData(Class<U> cls)
CastEventCopyright © 2022. All rights reserved.