Package pro.gravit.utils
Class HookSet<R>
- java.lang.Object
-
- pro.gravit.utils.HookSet<R>
-
public class HookSet<R> extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceHookSet.Hook<R>
-
Field Summary
Fields Modifier and Type Field Description java.util.Set<HookSet.Hook<R>>list
-
Constructor Summary
Constructors Constructor Description HookSet()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanhook(R context)voidregisterHook(HookSet.Hook<R> hook)booleanunregisterHook(HookSet.Hook<R> hook)
-
-
-
Field Detail
-
list
public final java.util.Set<HookSet.Hook<R>> list
-
-
Method Detail
-
registerHook
public void registerHook(HookSet.Hook<R> hook)
-
unregisterHook
public boolean unregisterHook(HookSet.Hook<R> hook)
-
hook
public boolean hook(R context) throws HookException
- Parameters:
context- custom param- Returns:
- True if hook to interrupt processing False to continue
- Throws:
HookException- The hook may return the error text throwing this exception
-
-