summaryrefslogtreecommitdiff
path: root/nlpsolver/src
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-08-08 11:36:04 +0200
committerNoel Grandin <noel@peralex.com>2014-08-13 08:49:22 +0200
commitda677dfd59c2b551f3335ee0a5d5dfb33f9869c5 (patch)
tree9aa09066c95935117bf405b119ed9f89f448a54d /nlpsolver/src
parent14d1a11ec4a7ed0deeac522403248536e8d23f57 (diff)
java: reduce scope, make fields private
found by UCDetector Change-Id: I7f97e15667159cf8ee776e8f32fdcdec8ec00ed6
Diffstat (limited to 'nlpsolver/src')
-rw-r--r--nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/BaseEvolutionarySolver.java22
-rw-r--r--nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/BaseNLPSolver.java28
-rw-r--r--nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/dialogs/BaseDialog.java4
-rw-r--r--nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/dialogs/controls/BaseControl.java4
4 files changed, 29 insertions, 29 deletions
diff --git a/nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/BaseEvolutionarySolver.java b/nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/BaseEvolutionarySolver.java
index a10a82eecb7b..a1a9cf29faea 100644
--- a/nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/BaseEvolutionarySolver.java
+++ b/nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/BaseEvolutionarySolver.java
@@ -61,11 +61,11 @@ public abstract class BaseEvolutionarySolver extends BaseNLPSolver {
}
protected class Variable {
- protected CellMap CellMap;
- protected int OriginalVariable;
- protected double MinValue;
- protected double MaxValue;
- protected double Granularity;
+ private CellMap CellMap;
+ private int OriginalVariable;
+ private double MinValue;
+ private double MaxValue;
+ private double Granularity;
private Variable(CellMap cellMap, int originalVariable) {
this.CellMap = cellMap;
@@ -152,19 +152,19 @@ public abstract class BaseEvolutionarySolver extends BaseNLPSolver {
protected double m_toleratedMin;
protected double m_toleratedMax;
- protected ArrayList<Variable> m_variables = new ArrayList<Variable>();
+ private ArrayList<Variable> m_variables = new ArrayList<Variable>();
//properties
protected PropertyInfo<Integer> m_swarmSize = new PropertyInfo<Integer>("SwarmSize", 70, "Size of Swam");
protected PropertyInfo<Integer> m_librarySize = new PropertyInfo<Integer>("LibrarySize", 210, "Size of Library");
protected PropertyInfo<Integer> m_learningCycles = new PropertyInfo<Integer>("LearningCycles", 2000, "Learning Cycles");
- protected PropertyInfo<Boolean> m_guessVariableRange = new PropertyInfo<Boolean>("GuessVariableRange", true, "Variable Bounds Guessing");
- protected PropertyInfo<Double> m_variableRangeThreshold = new PropertyInfo<Double>("VariableRangeThreshold", 3.0, "Variable Bounds Threshold (when guessing)"); //to approximate the variable bounds
- protected PropertyInfo<Boolean> m_useACRComperator = new PropertyInfo<Boolean>("UseACRComparator", false, "Use ACR Comparator (instead of BCH)");
- protected PropertyInfo<Boolean> m_useRandomStartingPoint = new PropertyInfo<Boolean>("UseRandomStartingPoint", false, "Use Random starting point");
+ private PropertyInfo<Boolean> m_guessVariableRange = new PropertyInfo<Boolean>("GuessVariableRange", true, "Variable Bounds Guessing");
+ private PropertyInfo<Double> m_variableRangeThreshold = new PropertyInfo<Double>("VariableRangeThreshold", 3.0, "Variable Bounds Threshold (when guessing)"); //to approximate the variable bounds
+ private PropertyInfo<Boolean> m_useACRComperator = new PropertyInfo<Boolean>("UseACRComparator", false, "Use ACR Comparator (instead of BCH)");
+ private PropertyInfo<Boolean> m_useRandomStartingPoint = new PropertyInfo<Boolean>("UseRandomStartingPoint", false, "Use Random starting point");
protected PropertyInfo<Integer> m_required = new PropertyInfo<Integer>("StagnationLimit", 70, "Stagnation Limit");
protected PropertyInfo<Double> m_tolerance = new PropertyInfo<Double>("Tolerance", 1e-6, "Stagnation Tolerance");
- protected PropertyInfo<Boolean> m_enhancedSolverStatus = new PropertyInfo<Boolean>("EnhancedSolverStatus", true, "Show enhanced solver status");
+ private PropertyInfo<Boolean> m_enhancedSolverStatus = new PropertyInfo<Boolean>("EnhancedSolverStatus", true, "Show enhanced solver status");
protected IEvolutionarySolverStatusDialog m_solverStatusDialog;
diff --git a/nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/BaseNLPSolver.java b/nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/BaseNLPSolver.java
index 3709ecb9c12a..34338123c2dd 100644
--- a/nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/BaseNLPSolver.java
+++ b/nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/BaseNLPSolver.java
@@ -71,13 +71,13 @@ public abstract class BaseNLPSolver extends WeakBase
{
protected final XComponentContext m_xContext;
- protected final String m_name;
+ private final String m_name;
- protected final ArrayList<PropertyInfo> m_properties = new ArrayList<PropertyInfo>();
- protected final HashMap<String, PropertyInfo> m_propertyMap = new HashMap<String, PropertyInfo>();
+ private final ArrayList<PropertyInfo> m_properties = new ArrayList<PropertyInfo>();
+ private final HashMap<String, PropertyInfo> m_propertyMap = new HashMap<String, PropertyInfo>();
- protected com.sun.star.lang.Locale m_locale = new com.sun.star.lang.Locale();
- protected final ResourceManager resourceManager;
+ private com.sun.star.lang.Locale m_locale = new com.sun.star.lang.Locale();
+ private final ResourceManager resourceManager;
public BaseNLPSolver(XComponentContext xContext, String name) {
m_xContext = xContext;
@@ -115,11 +115,11 @@ public abstract class BaseNLPSolver extends WeakBase
// com.sun.star.sheet.XSolver:
- protected XSpreadsheetDocument m_document;
- protected XMultiComponentFactory m_componentFactory;
- protected XModel m_xModel;
+ private XSpreadsheetDocument m_document;
+ private XMultiComponentFactory m_componentFactory;
+ private XModel m_xModel;
protected XReschedule m_xReschedule;
- protected CellAddress m_objective;
+ private CellAddress m_objective;
protected CellAddress[] m_variables;
protected SolverConstraint[] m_constraints;
protected ExtSolverConstraint[] m_extConstraints;
@@ -130,7 +130,7 @@ public abstract class BaseNLPSolver extends WeakBase
protected int m_cellRangeCount;
protected XCell m_objectiveCell;
protected XCell[] m_variableCells;
- protected CellRangeAddress[] m_cellRanges;
+ private CellRangeAddress[] m_cellRanges;
protected XChartDataArray[] m_cellRangeData;
protected CellMap[] m_variableMap;
protected double[][][] m_variableData;
@@ -165,10 +165,10 @@ public abstract class BaseNLPSolver extends WeakBase
}
protected class RowInfo {
- protected short Sheet;
- protected int Row;
- protected int StartCol;
- protected int EndCol;
+ private short Sheet;
+ private int Row;
+ private int StartCol;
+ private int EndCol;
private RowInfo(short sheet, int row) {
Sheet = sheet;
diff --git a/nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/dialogs/BaseDialog.java b/nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/dialogs/BaseDialog.java
index fec55c92a833..2aaa534ddff2 100644
--- a/nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/dialogs/BaseDialog.java
+++ b/nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/dialogs/BaseDialog.java
@@ -61,8 +61,8 @@ public abstract class BaseDialog extends BaseControl {
private XMultiServiceFactory xMSF;
protected XWindow xWindow;
protected XDialog xDialog;
- protected XWindowPeer xWindowPeer;
- protected ModalState modalState;
+ private XWindowPeer xWindowPeer;
+ private ModalState modalState;
@Override
public String getName() {
diff --git a/nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/dialogs/controls/BaseControl.java b/nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/dialogs/controls/BaseControl.java
index 01d724c351d0..a1de9d28ff29 100644
--- a/nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/dialogs/controls/BaseControl.java
+++ b/nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/dialogs/controls/BaseControl.java
@@ -46,8 +46,8 @@ public abstract class BaseControl {
protected XComponentContext context;
private Object unoModel;
protected Object unoControl;
- protected XPropertySet properties;
- protected BaseControl parentControl;
+ private XPropertySet properties;
+ private BaseControl parentControl;
public abstract String getName();