From 5f6480ba4e9cc89082ae3b866ae6bf185d2a4170 Mon Sep 17 00:00:00 2001 From: Sergey Solovyev Date: Sun, 7 Oct 2012 20:11:29 +0400 Subject: [PATCH] registries --- .../calculator/CalculatorFunctionsMathRegistry.java | 0 .../solovyev/android/calculator/FunctionCategory.java | 0 .../android/calculator/model/MathEntityBuilder.java | 0 .../org/solovyev/android/calculator/model/Var.java | 0 .../org/solovyev/android/calculator/model/Vars.java | 0 .../calculator/{model => }/AndroidVarCategory.java | 3 +-- .../CalculatorPostfixFunctionsRegistry.java | 5 ++--- .../{model => }/CalculatorVarsRegistry.java | 11 +++++------ .../android/calculator/{model => }/VarCategory.java | 8 ++++---- .../calculator/math/edit/CalculatorVarsActivity.java | 4 ++-- 10 files changed, 14 insertions(+), 17 deletions(-) rename {calculatorpp => calculatorpp-core}/src/main/java/org/solovyev/android/calculator/CalculatorFunctionsMathRegistry.java (100%) rename {calculatorpp => calculatorpp-core}/src/main/java/org/solovyev/android/calculator/FunctionCategory.java (100%) rename {calculatorpp => calculatorpp-core}/src/main/java/org/solovyev/android/calculator/model/MathEntityBuilder.java (100%) rename {calculatorpp => calculatorpp-core}/src/main/java/org/solovyev/android/calculator/model/Var.java (100%) rename {calculatorpp => calculatorpp-core}/src/main/java/org/solovyev/android/calculator/model/Vars.java (100%) rename calculatorpp/src/main/java/org/solovyev/android/calculator/{model => }/AndroidVarCategory.java (89%) rename calculatorpp/src/main/java/org/solovyev/android/calculator/{model => }/CalculatorPostfixFunctionsRegistry.java (92%) rename calculatorpp/src/main/java/org/solovyev/android/calculator/{model => }/CalculatorVarsRegistry.java (86%) rename calculatorpp/src/main/java/org/solovyev/android/calculator/{model => }/VarCategory.java (79%) diff --git a/calculatorpp/src/main/java/org/solovyev/android/calculator/CalculatorFunctionsMathRegistry.java b/calculatorpp-core/src/main/java/org/solovyev/android/calculator/CalculatorFunctionsMathRegistry.java similarity index 100% rename from calculatorpp/src/main/java/org/solovyev/android/calculator/CalculatorFunctionsMathRegistry.java rename to calculatorpp-core/src/main/java/org/solovyev/android/calculator/CalculatorFunctionsMathRegistry.java diff --git a/calculatorpp/src/main/java/org/solovyev/android/calculator/FunctionCategory.java b/calculatorpp-core/src/main/java/org/solovyev/android/calculator/FunctionCategory.java similarity index 100% rename from calculatorpp/src/main/java/org/solovyev/android/calculator/FunctionCategory.java rename to calculatorpp-core/src/main/java/org/solovyev/android/calculator/FunctionCategory.java diff --git a/calculatorpp/src/main/java/org/solovyev/android/calculator/model/MathEntityBuilder.java b/calculatorpp-core/src/main/java/org/solovyev/android/calculator/model/MathEntityBuilder.java similarity index 100% rename from calculatorpp/src/main/java/org/solovyev/android/calculator/model/MathEntityBuilder.java rename to calculatorpp-core/src/main/java/org/solovyev/android/calculator/model/MathEntityBuilder.java diff --git a/calculatorpp/src/main/java/org/solovyev/android/calculator/model/Var.java b/calculatorpp-core/src/main/java/org/solovyev/android/calculator/model/Var.java similarity index 100% rename from calculatorpp/src/main/java/org/solovyev/android/calculator/model/Var.java rename to calculatorpp-core/src/main/java/org/solovyev/android/calculator/model/Var.java diff --git a/calculatorpp/src/main/java/org/solovyev/android/calculator/model/Vars.java b/calculatorpp-core/src/main/java/org/solovyev/android/calculator/model/Vars.java similarity index 100% rename from calculatorpp/src/main/java/org/solovyev/android/calculator/model/Vars.java rename to calculatorpp-core/src/main/java/org/solovyev/android/calculator/model/Vars.java diff --git a/calculatorpp/src/main/java/org/solovyev/android/calculator/model/AndroidVarCategory.java b/calculatorpp/src/main/java/org/solovyev/android/calculator/AndroidVarCategory.java similarity index 89% rename from calculatorpp/src/main/java/org/solovyev/android/calculator/model/AndroidVarCategory.java rename to calculatorpp/src/main/java/org/solovyev/android/calculator/AndroidVarCategory.java index eb543853..0e1124f8 100644 --- a/calculatorpp/src/main/java/org/solovyev/android/calculator/model/AndroidVarCategory.java +++ b/calculatorpp/src/main/java/org/solovyev/android/calculator/AndroidVarCategory.java @@ -1,8 +1,7 @@ -package org.solovyev.android.calculator.model; +package org.solovyev.android.calculator; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; -import org.solovyev.android.calculator.R; /** * User: serso diff --git a/calculatorpp/src/main/java/org/solovyev/android/calculator/model/CalculatorPostfixFunctionsRegistry.java b/calculatorpp/src/main/java/org/solovyev/android/calculator/CalculatorPostfixFunctionsRegistry.java similarity index 92% rename from calculatorpp/src/main/java/org/solovyev/android/calculator/model/CalculatorPostfixFunctionsRegistry.java rename to calculatorpp/src/main/java/org/solovyev/android/calculator/CalculatorPostfixFunctionsRegistry.java index af8adfb0..8d973133 100644 --- a/calculatorpp/src/main/java/org/solovyev/android/calculator/model/CalculatorPostfixFunctionsRegistry.java +++ b/calculatorpp/src/main/java/org/solovyev/android/calculator/CalculatorPostfixFunctionsRegistry.java @@ -4,11 +4,10 @@ * or visit http://se.solovyev.org */ -package org.solovyev.android.calculator.model; +package org.solovyev.android.calculator; import jscl.math.operator.Operator; import org.jetbrains.annotations.NotNull; -import org.solovyev.android.calculator.*; import org.solovyev.common.JBuilder; import org.solovyev.common.math.MathRegistry; @@ -34,7 +33,7 @@ public class CalculatorPostfixFunctionsRegistry extends AbstractCalculatorMathRe @NotNull private static final String POSTFIX_FUNCTION_DESCRIPTION_PREFIX = "c_pf_description_"; - protected CalculatorPostfixFunctionsRegistry(@NotNull MathRegistry functionsRegistry, + public CalculatorPostfixFunctionsRegistry(@NotNull MathRegistry functionsRegistry, @NotNull MathEntityDao mathEntityDao) { super(functionsRegistry, POSTFIX_FUNCTION_DESCRIPTION_PREFIX, mathEntityDao); } diff --git a/calculatorpp/src/main/java/org/solovyev/android/calculator/model/CalculatorVarsRegistry.java b/calculatorpp/src/main/java/org/solovyev/android/calculator/CalculatorVarsRegistry.java similarity index 86% rename from calculatorpp/src/main/java/org/solovyev/android/calculator/model/CalculatorVarsRegistry.java rename to calculatorpp/src/main/java/org/solovyev/android/calculator/CalculatorVarsRegistry.java index 75b517e7..ca30de0e 100644 --- a/calculatorpp/src/main/java/org/solovyev/android/calculator/model/CalculatorVarsRegistry.java +++ b/calculatorpp/src/main/java/org/solovyev/android/calculator/CalculatorVarsRegistry.java @@ -4,13 +4,12 @@ * or visit http://se.solovyev.org */ -package org.solovyev.android.calculator.model; +package org.solovyev.android.calculator; import jscl.math.function.IConstant; import org.jetbrains.annotations.NotNull; -import org.solovyev.android.calculator.AbstractCalculatorMathRegistry; -import org.solovyev.android.calculator.MathEntityDao; -import org.solovyev.android.calculator.MathEntityPersistenceContainer; +import org.solovyev.android.calculator.model.Var; +import org.solovyev.android.calculator.model.Vars; import org.solovyev.common.JBuilder; import org.solovyev.common.math.MathRegistry; @@ -22,7 +21,7 @@ import java.util.Map; * Date: 9/29/11 * Time: 4:57 PM */ -class CalculatorVarsRegistry extends AbstractCalculatorMathRegistry { +public class CalculatorVarsRegistry extends AbstractCalculatorMathRegistry { @NotNull private static final Map substitutes = new HashMap(); @@ -34,7 +33,7 @@ class CalculatorVarsRegistry extends AbstractCalculatorMathRegistry mathRegistry, + public CalculatorVarsRegistry(@NotNull MathRegistry mathRegistry, @NotNull MathEntityDao mathEntityDao) { super(mathRegistry, "c_var_description_", mathEntityDao); } diff --git a/calculatorpp/src/main/java/org/solovyev/android/calculator/model/VarCategory.java b/calculatorpp/src/main/java/org/solovyev/android/calculator/VarCategory.java similarity index 79% rename from calculatorpp/src/main/java/org/solovyev/android/calculator/model/VarCategory.java rename to calculatorpp/src/main/java/org/solovyev/android/calculator/VarCategory.java index 96c74875..d3aec85b 100644 --- a/calculatorpp/src/main/java/org/solovyev/android/calculator/model/VarCategory.java +++ b/calculatorpp/src/main/java/org/solovyev/android/calculator/VarCategory.java @@ -1,4 +1,4 @@ -package org.solovyev.android.calculator.model; +package org.solovyev.android.calculator; import jscl.math.function.IConstant; import org.jetbrains.annotations.NotNull; @@ -17,14 +17,14 @@ public enum VarCategory { system(100){ @Override - boolean isInCategory(@NotNull IConstant var) { + public boolean isInCategory(@NotNull IConstant var) { return var.isSystem(); } }, my(0) { @Override - boolean isInCategory(@NotNull IConstant var) { + public boolean isInCategory(@NotNull IConstant var) { return !var.isSystem(); } }; @@ -35,7 +35,7 @@ public enum VarCategory { this.tabOrder = tabOrder; } - abstract boolean isInCategory(@NotNull IConstant var); + public abstract boolean isInCategory(@NotNull IConstant var); @NotNull public static List getCategoriesByTabOrder() { diff --git a/calculatorpp/src/main/java/org/solovyev/android/calculator/math/edit/CalculatorVarsActivity.java b/calculatorpp/src/main/java/org/solovyev/android/calculator/math/edit/CalculatorVarsActivity.java index 177ccb34..e9e93952 100644 --- a/calculatorpp/src/main/java/org/solovyev/android/calculator/math/edit/CalculatorVarsActivity.java +++ b/calculatorpp/src/main/java/org/solovyev/android/calculator/math/edit/CalculatorVarsActivity.java @@ -14,8 +14,8 @@ import org.jetbrains.annotations.Nullable; import org.solovyev.android.calculator.*; import org.solovyev.android.calculator.about.CalculatorFragmentType; import org.solovyev.android.calculator.history.CalculatorHistoryActivity; -import org.solovyev.android.calculator.model.AndroidVarCategory; -import org.solovyev.android.calculator.model.VarCategory; +import org.solovyev.android.calculator.AndroidVarCategory; +import org.solovyev.android.calculator.VarCategory; /** * User: serso