1
0
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:
2017-07-25 21:50:30 -07:00
parent 7e7525cf37
commit 3cf4f958b0
3 changed files with 94 additions and 28 deletions

View File

@@ -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();
}