mirror of
https://github.com/DanilaFe/abacus
synced 2024-12-22 15:30:09 -08:00
Add a map to promoting priorities.
This commit is contained in:
parent
d0421d93ca
commit
7bab3773dc
|
@ -1,7 +1,14 @@
|
||||||
package org.nwapw.abacus.number;
|
package org.nwapw.abacus.number;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
|
|
||||||
public abstract class Function {
|
public abstract class Function {
|
||||||
|
|
||||||
|
private static final HashMap<Class<? extends Number>, Integer> priorityMap =
|
||||||
|
new HashMap<Class<? extends Number>, Integer>() {{
|
||||||
|
put(NaiveNumber.class, 0);
|
||||||
|
}};
|
||||||
|
|
||||||
protected abstract boolean matchesParams(Number[] params);
|
protected abstract boolean matchesParams(Number[] params);
|
||||||
protected abstract Number applyInternal(Number[] params);
|
protected abstract Number applyInternal(Number[] params);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user