mirror of
https://github.com/DanilaFe/abacus
synced 2024-11-13 14:19:53 -08:00
Merge branch 'master' of https://github.com/DanilaFe/abacus
This commit is contained in:
commit
55c7f939d8
28
src/org/nwapw/abacus/number/externalFunction.java
Normal file
28
src/org/nwapw/abacus/number/externalFunction.java
Normal file
|
@ -0,0 +1,28 @@
|
|||
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();
|
||||
}
|
Loading…
Reference in New Issue
Block a user