1
0
mirror of https://github.com/DanilaFe/abacus synced 2024-12-23 16:00:09 -08:00

Add a promotion priority to PerciseNumber

This commit is contained in:
Danila Fedorin 2017-07-28 14:39:37 -07:00
parent 6aa9225eee
commit 9e3b550a15

View File

@ -2,6 +2,7 @@ package org.nwapw.abacus.function;
import org.nwapw.abacus.number.NaiveNumber; import org.nwapw.abacus.number.NaiveNumber;
import org.nwapw.abacus.number.NumberInterface; import org.nwapw.abacus.number.NumberInterface;
import org.nwapw.abacus.number.PreciseNumber;
import java.util.HashMap; import java.util.HashMap;
@ -17,6 +18,7 @@ public abstract class Function {
private static final HashMap<Class<? extends NumberInterface>, Integer> priorityMap = private static final HashMap<Class<? extends NumberInterface>, Integer> priorityMap =
new HashMap<Class<? extends NumberInterface>, Integer>() {{ new HashMap<Class<? extends NumberInterface>, Integer>() {{
put(NaiveNumber.class, 0); put(NaiveNumber.class, 0);
put(PreciseNumber.class, 1);
}}; }};
/** /**