package org.nwapw.abacus.plugin;

import org.nwapw.abacus.number.NumberInterface;

import java.util.HashMap;
import java.util.Map;
import java.util.function.Function;

public abstract class NumberImplementation {

    private Class<? extends NumberInterface> implementation;
    private Map<String, Function<NumberInterface, NumberInterface>> promotionPaths;
    private int priority;

    public NumberImplementation(Class<? extends NumberInterface> implementation, int priority){
        this.implementation = implementation;
        this.priority = priority;
        promotionPaths = new HashMap<>();
    }

    public abstract NumberInterface instanceForString(String string);
    public abstract NumberInterface instanceForPi();

}

@@ -213,22 +213,28 @@
 %0A%0A    pr
-ivate 
+otected Map%3C
 Class%3C? 
@@ -261,47 +261,8 @@
 ace%3E
- implementation;%0A    private Map%3CString
 , Fu
@@ -319,16 +319,77 @@
 nPaths;%0A
+    private Class%3C? extends NumberInterface%3E implementation;%0A
     priv

Make the promotion map protected and use classes.