summaryrefslogtreecommitdiff
path: root/nlpsolver/src
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-08-08 12:44:57 +0200
committerNoel Grandin <noel@peralex.com>2014-08-13 08:49:23 +0200
commit68cd011c907d00493bf2bfde531c1e244819596b (patch)
tree0225318c908b00faaa701a19aaf7aa567c3582a0 /nlpsolver/src
parent70f56bc22fe952c75ec714e05e1bb5296491a36a (diff)
java: reduce scope, make some methods private
found by UCDetector Change-Id: Ib1425edde146193a65c242dc159b7e3fbf0e4a2e
Diffstat (limited to 'nlpsolver/src')
-rw-r--r--nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/BaseEvolutionarySolver.java4
-rw-r--r--nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/BaseNLPSolver.java14
2 files changed, 9 insertions, 9 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 e3db5d16fa2f..9d779afe7225 100644
--- a/nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/BaseEvolutionarySolver.java
+++ b/nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/BaseEvolutionarySolver.java
@@ -168,7 +168,7 @@ public abstract class BaseEvolutionarySolver extends BaseNLPSolver {
protected IEvolutionarySolverStatusDialog m_solverStatusDialog;
- protected void prepareVariables(double[][] variableBounds) {
+ private void prepareVariables(double[][] variableBounds) {
m_variables.clear();
for (int i = 0; i < m_variableCount; i++) {
Variable var = new Variable(m_variableMap[i], i);
@@ -342,7 +342,7 @@ public abstract class BaseEvolutionarySolver extends BaseNLPSolver {
super.finalizeSolve();
}
- protected boolean checkConstraints() {
+ private boolean checkConstraints() {
boolean result = true;
for (int i = 0; i < m_constraintCount && result; i++) {
if (m_extConstraints[i].Left.getError() == 0) {
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 ef7ae96debef..7401af7eda0c 100644
--- a/nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/BaseNLPSolver.java
+++ b/nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/BaseNLPSolver.java
@@ -175,7 +175,7 @@ public abstract class BaseNLPSolver extends WeakBase
Row = row;
}
- public CellRangeAddress getCellRangeAddress(int lastRow) {
+ private CellRangeAddress getCellRangeAddress(int lastRow) {
CellRangeAddress result = new CellRangeAddress();
result.Sheet = Sheet;
result.StartColumn = StartCol;
@@ -341,11 +341,11 @@ public abstract class BaseNLPSolver extends WeakBase
return m_currentParameters;
}
- protected XCell getCell(CellAddress cellAddress) {
+ private XCell getCell(CellAddress cellAddress) {
return getCell(cellAddress.Column, cellAddress.Row, cellAddress.Sheet);
}
- protected XCell getCell(int col, int row, int sheet) {
+ private XCell getCell(int col, int row, int sheet) {
try {
XSpreadsheets xSpreadsheets = m_document.getSheets();
XIndexAccess xSheetIndex = UnoRuntime.queryInterface(XIndexAccess.class, xSpreadsheets);
@@ -365,7 +365,7 @@ public abstract class BaseNLPSolver extends WeakBase
cellRangeAddress.StartRow, cellRangeAddress.EndColumn, cellRangeAddress.EndRow);
}
- protected XCellRangeData getCellRangeData(int sheet, int startCol, int startRow, int endCol, int endRow) {
+ private XCellRangeData getCellRangeData(int sheet, int startCol, int startRow, int endCol, int endRow) {
try {
XSpreadsheets xSpreadsheets = m_document.getSheets();
XIndexAccess xSheetIndex = UnoRuntime.queryInterface(XIndexAccess.class, xSpreadsheets);
@@ -380,12 +380,12 @@ public abstract class BaseNLPSolver extends WeakBase
return null;
}
- protected XChartDataArray getChartDataArray(CellRangeAddress cellRangeAddress) {
+ private XChartDataArray getChartDataArray(CellRangeAddress cellRangeAddress) {
return getChartDataArray(cellRangeAddress.Sheet, cellRangeAddress.StartColumn,
cellRangeAddress.StartRow, cellRangeAddress.EndColumn, cellRangeAddress.EndRow);
}
- protected XChartDataArray getChartDataArray(int sheet, int startCol, int startRow, int endCol, int endRow) {
+ private XChartDataArray getChartDataArray(int sheet, int startCol, int startRow, int endCol, int endRow) {
try {
XSpreadsheets xSpreadsheets = m_document.getSheets();
XIndexAccess xSheetIndex = UnoRuntime.queryInterface(XIndexAccess.class, xSpreadsheets);
@@ -487,7 +487,7 @@ public abstract class BaseNLPSolver extends WeakBase
}
// <editor-fold defaultstate="collapsed" desc="Helper functions">
- protected void lockDocument(boolean lock) {
+ private void lockDocument(boolean lock) {
if (lock)
m_xModel.lockControllers();
else