public interface Handle<T extends SmartEvent> extends Consumer<T>, Type<T>
| Modifier and Type | Method and Description |
|---|---|
static <T extends SmartEvent> |
from(@NotNull Class<T> clazz,
@NotNull Consumer<T> consumer,
@NotNull List<Predicate<T>> requirements)
creates a simple handler.
|
static <T extends SmartEvent> |
from(@NotNull Class<T> clazz,
@NotNull Consumer<T> consumer,
Predicate<T>... requirements)
creates a simple handler.
|
@NotNull static <T extends SmartEvent> @NotNull Handle<T> from(@NotNull @NotNull Class<T> clazz, @NotNull @NotNull Consumer<T> consumer, @NotNull @NotNull List<Predicate<T>> requirements)
T - type of the SmartEvent.clazz - the class to determine the type of the event.consumer - the consumer to run.requirements - the requirements to check.@SafeVarargs @NotNull static <T extends SmartEvent> @NotNull Handle<T> from(@NotNull @NotNull Class<T> clazz, @NotNull @NotNull Consumer<T> consumer, @NotNull Predicate<T>... requirements)
T - type of the SmartEvent.clazz - the class to determine the type of the event.consumer - the consumer to run.requirements - the requirements to check.Copyright © 2021. All rights reserved.