mirror of
https://github.com/DanilaFe/abacus
synced 2026-01-10 17:25:19 +00:00
Rename ExternalFunction --> Plugin, and implement plugin loading.
This commit is contained in:
@@ -1,28 +0,0 @@
|
||||
package org.nwapw.abacus.number;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
public abstract class externalFunction {
|
||||
|
||||
private HashMap<String, Function> functions;
|
||||
|
||||
public externalFunction(){
|
||||
functions=new HashMap<>();
|
||||
}
|
||||
|
||||
public boolean hasFunction(Function x){
|
||||
return functions.containsKey(x);
|
||||
}
|
||||
public Function getFunction(String x){
|
||||
return functions.get(x);
|
||||
}
|
||||
public boolean registerFunction(String x, Function y){
|
||||
if(!functions.containsKey(x))
|
||||
return functions.put(x,y)==null;
|
||||
return false;
|
||||
}
|
||||
public Function functionFor(String x){
|
||||
return null;
|
||||
}
|
||||
public abstract void load();
|
||||
}
|
||||
Reference in New Issue
Block a user