You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
I cannot create event to store a parameter as T.
Describe the solution you'd like
The better solution for me, is to be able to create an event: event MyEvent<T>.
Describe alternatives you've considered
An alternative could be the creation of (generic) functions in event, this allows to create a function that can return a value as T. This allows to store the parameter as Object and avoids the problem defined in the following Additional context.
Additional context
As exchanged with @gallandarakhneorg : emit(new MyEvent<Float>) is easy to understand. The question is related to a clear definition into the receiving agent regarding different syntaxes, e.g. on MyEvent{}, on MyEvent<Float> {}, on MyEvent<? extends Number> {}, etc.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
I cannot create event to store a parameter as
T
.Describe the solution you'd like
The better solution for me, is to be able to create an event:
event MyEvent<T>
.Describe alternatives you've considered
An alternative could be the creation of (generic) functions in
event
, this allows to create a function that can return a value asT
. This allows to store the parameter asObject
and avoids the problem defined in the following Additional context.Additional context
As exchanged with @gallandarakhneorg :
emit(new MyEvent<Float>)
is easy to understand. The question is related to a clear definition into the receiving agent regarding different syntaxes, e.g.on MyEvent{}
,on MyEvent<Float> {}
,on MyEvent<? extends Number> {}
, etc.The text was updated successfully, but these errors were encountered: