mirror of
https://github.com/DanilaFe/abacus
synced 2024-12-23 16:00:09 -08:00
Prevent operation lookups, as they pollute the cache.
This commit is contained in:
parent
4f9c8dee9a
commit
15e42126b5
|
@ -107,14 +107,9 @@ public abstract class Plugin {
|
||||||
* plugin internally, which makes it accessible to the plugin manager.
|
* plugin internally, which makes it accessible to the plugin manager.
|
||||||
* @param name the name to register by.
|
* @param name the name to register by.
|
||||||
* @param toRegister the function implementation.
|
* @param toRegister the function implementation.
|
||||||
* @return true if the function was registered successfully, false if not.
|
|
||||||
*/
|
*/
|
||||||
protected final boolean registerFunction(String name, Function toRegister) {
|
protected final void registerFunction(String name, Function toRegister) {
|
||||||
if(functionFor(name) == null){
|
functions.put(name, toRegister);
|
||||||
functions.put(name, toRegister);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -123,14 +118,9 @@ public abstract class Plugin {
|
||||||
* the plugin manager.
|
* the plugin manager.
|
||||||
* @param name the name of the operator.
|
* @param name the name of the operator.
|
||||||
* @param operator the operator to register.
|
* @param operator the operator to register.
|
||||||
* @return true if the operator was registered successfully, false if not.
|
|
||||||
*/
|
*/
|
||||||
protected final boolean registerOperator(String name, Operator operator) {
|
protected final void registerOperator(String name, Operator operator) {
|
||||||
if(operatorFor(name) == null){
|
operators.put(name, operator);
|
||||||
operators.put(name, operator);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue
Block a user