Share via


KernelHook<T> Interface

Type Parameters

T

The type of the event that the hook is interested in

Implements

java.util.function.Function<T,T> java.util.function.Predicate<KernelHookEvent>

public interface KernelHook<T>
extends java.util.function.Predicate<KernelHookEvent>, java.util.function.Function<T,T>

Represents a hook that can be used to intercept and modify arguments to KernelFunctions. A KernelHook implements a Predicate that determines if the hook is interested in a particular event, and a Function that can be used to modify the event. The

Method Summary

Modifier and Type Method and Description
default int getPriority()

The priority of the hook.

Method Details

getPriority

public default int getPriority()

The priority of the hook. The default priority is 50. The priority is used to determine the order in which hooks that accept the same event type are executed, lower priorities are executed first. No ordering is guaranteed for hooks with the same priority.

Returns:

the priority of the hook

Applies to