create

inline fun <E : Event, H> EventFilter.Companion.create(handlerGetter: Function<E, H>?): EventFilter<E, H>

Creates a new event filter for the given event type E and handler type H on the event, using the given handlerGetter, if given, to get the handler object from the event.

If the handler getter is null, EventFilter.getHandler on the filter will always return null.

Return

the event filter

Parameters

E

the type of event to filter for

H

the type of handler object to filter from the event

handlerGetter

the function to get the handler object from the event