mirror of
https://github.com/DanilaFe/abacus
synced 2026-01-07 16:05:19 +00:00
Add a map to promoting priorities.
This commit is contained in:
@@ -1,7 +1,14 @@
|
||||
package org.nwapw.abacus.number;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
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 Number applyInternal(Number[] params);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user