Add Callback Event Handling #26
@ -9,7 +9,7 @@ import java.util.function.Consumer;
|
|||||||
* @author Kai S. K. Engelbart
|
* @author Kai S. K. Engelbart
|
||||||
* @since 1.2.0
|
* @since 1.2.0
|
||||||
*/
|
*/
|
||||||
public class CallbackEventHandler implements EventHandler {
|
public final class CallbackEventHandler implements EventHandler {
|
||||||
kske marked this conversation as resolved
Outdated
|
|||||||
|
|
||||||
private final Class<?> eventType;
|
private final Class<?> eventType;
|
||||||
private final Consumer<Object> callback;
|
private final Consumer<Object> callback;
|
||||||
delvh marked this conversation as resolved
delvh
commented
What about Consumer ? What about Consumer<?> ?
kske
commented
This wouldn't work, as `callback.accept(event)' would complain about an incompatible argument type. This wouldn't work, as `callback.accept(event)' would complain about an incompatible argument type.
|
|||||||
|
Loading…
Reference in New Issue
Block a user
final?