registries
This commit is contained in:
parent
52e6b4b79d
commit
5f6480ba4e
@ -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
|
@ -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<Operator> functionsRegistry,
|
||||
public CalculatorPostfixFunctionsRegistry(@NotNull MathRegistry<Operator> functionsRegistry,
|
||||
@NotNull MathEntityDao<MathPersistenceEntity> mathEntityDao) {
|
||||
super(functionsRegistry, POSTFIX_FUNCTION_DESCRIPTION_PREFIX, mathEntityDao);
|
||||
}
|
@ -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<IConstant, Var> {
|
||||
public class CalculatorVarsRegistry extends AbstractCalculatorMathRegistry<IConstant, Var> {
|
||||
|
||||
@NotNull
|
||||
private static final Map<String, String> substitutes = new HashMap<String, String>();
|
||||
@ -34,7 +33,7 @@ class CalculatorVarsRegistry extends AbstractCalculatorMathRegistry<IConstant, V
|
||||
substitutes.put("NaN", "nan");
|
||||
}
|
||||
|
||||
protected CalculatorVarsRegistry(@NotNull MathRegistry<IConstant> mathRegistry,
|
||||
public CalculatorVarsRegistry(@NotNull MathRegistry<IConstant> mathRegistry,
|
||||
@NotNull MathEntityDao<Var> mathEntityDao) {
|
||||
super(mathRegistry, "c_var_description_", mathEntityDao);
|
||||
}
|
@ -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<VarCategory> getCategoriesByTabOrder() {
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user