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