package org.nwapw.abacus.number;

public abstract class Function {

    protected abstract boolean matchesParams(Number[] params);
    protected abstract Number applyInternal(Number[] params);

    public Number apply(Number...params) {
        if(!matchesParams(params)) return null;
        return applyInternal(params);
    }

}

@@ -27,16 +27,43 @@
 umber;%0A%0A
+import java.util.HashMap;%0A%0A
 public a
@@ -88,16 +88,220 @@
 tion %7B%0A%0A
+    private static final HashMap%3CClass%3C? extends Number%3E, Integer%3E priorityMap =%0A            new HashMap%3CClass%3C? extends Number%3E, Integer%3E() %7B%7B%0A                put(NaiveNumber.class, 0);%0A            %7D%7D;%0A%0A
     prot

Add a map to promoting priorities.