From 7bab3773dc37c430d8e4ce833c29dc7799c15005 Mon Sep 17 00:00:00 2001 From: Danila Fedorin Date: Mon, 24 Jul 2017 14:26:09 -0700 Subject: [PATCH] Add a map to promoting priorities. --- src/org/nwapw/abacus/number/Function.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/org/nwapw/abacus/number/Function.java b/src/org/nwapw/abacus/number/Function.java index 8b42124..807bea7 100644 --- a/src/org/nwapw/abacus/number/Function.java +++ b/src/org/nwapw/abacus/number/Function.java @@ -1,7 +1,14 @@ package org.nwapw.abacus.number; +import java.util.HashMap; + public abstract class Function { + private static final HashMap, Integer> priorityMap = + new HashMap, Integer>() {{ + put(NaiveNumber.class, 0); + }}; + protected abstract boolean matchesParams(Number[] params); protected abstract Number applyInternal(Number[] params);