aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJaven O'Neal <onealj@apache.org>2016-06-11 02:12:43 +0000
committerJaven O'Neal <onealj@apache.org>2016-06-11 02:12:43 +0000
commit432769694cc196a9a188e0eae5a55c75b51de9ad (patch)
tree850833c0e28a9ad7915a0af703b1db5fc1cb09f5
parente5bc4d22ce9c37782ed9d847c62211cf0fd8d125 (diff)
downloadpoi-432769694cc196a9a188e0eae5a55c75b51de9ad.tar.gz
poi-432769694cc196a9a188e0eae5a55c75b51de9ad.zip
whitespace (tabs to spaces); +props svn:eol-style=native
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1747839 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFEvaluationSheet.java102
1 files changed, 51 insertions, 51 deletions
diff --git a/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFEvaluationSheet.java b/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFEvaluationSheet.java
index 329f78f3ed..22e1449db1 100644
--- a/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFEvaluationSheet.java
+++ b/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFEvaluationSheet.java
@@ -30,57 +30,57 @@ import org.apache.poi.ss.usermodel.Row;
*/
final class XSSFEvaluationSheet implements EvaluationSheet {
- private final XSSFSheet _xs;
- private Map<CellKey, EvaluationCell> _cellCache;
+ private final XSSFSheet _xs;
+ private Map<CellKey, EvaluationCell> _cellCache;
- public XSSFEvaluationSheet(XSSFSheet sheet) {
- _xs = sheet;
- }
+ public XSSFEvaluationSheet(XSSFSheet sheet) {
+ _xs = sheet;
+ }
- public XSSFSheet getXSSFSheet() {
- return _xs;
- }
- public EvaluationCell getCell(int rowIndex, int columnIndex) {
- // cache for performance: ~30% speedup due to caching
- if (_cellCache == null) {
- _cellCache = new HashMap<CellKey, EvaluationCell>(_xs.getLastRowNum()*3);
- for (final Row row : _xs) {
- final int rowNum = row.getRowNum();
- for (final Cell cell : row) {
- // cast is safe, the iterator is just defined using the interface
- final CellKey key = new CellKey(rowNum, cell.getColumnIndex());
- final EvaluationCell evalcell = new XSSFEvaluationCell((XSSFCell) cell, this);
- _cellCache.put(key, evalcell);
- }
- }
- }
-
- return _cellCache.get(new CellKey(rowIndex, columnIndex));
-
- }
-
- private static class CellKey {
- private final int _row;
- private final int _col;
- private final int _hash;
-
- protected CellKey(int row, int col) {
- _row = row;
- _col = col;
- _hash = (17 * 37 + row) * 37 + col;
- }
-
- @Override
- public int hashCode() {
- return _hash;
- }
-
- @Override
- public boolean equals(Object obj) {
- if (obj == null) return false;
- // assumes other object is one of us, otherwise ClassCastException is thrown
- final CellKey oKey = (CellKey) obj;
- return _row == oKey._row && _col == oKey._col;
- }
- }
+ public XSSFSheet getXSSFSheet() {
+ return _xs;
+ }
+
+ public EvaluationCell getCell(int rowIndex, int columnIndex) {
+ // cache for performance: ~30% speedup due to caching
+ if (_cellCache == null) {
+ _cellCache = new HashMap<CellKey, EvaluationCell>(_xs.getLastRowNum()*3);
+ for (final Row row : _xs) {
+ final int rowNum = row.getRowNum();
+ for (final Cell cell : row) {
+ // cast is safe, the iterator is just defined using the interface
+ final CellKey key = new CellKey(rowNum, cell.getColumnIndex());
+ final EvaluationCell evalcell = new XSSFEvaluationCell((XSSFCell) cell, this);
+ _cellCache.put(key, evalcell);
+ }
+ }
+ }
+
+ return _cellCache.get(new CellKey(rowIndex, columnIndex));
+ }
+
+ private static class CellKey {
+ private final int _row;
+ private final int _col;
+ private final int _hash;
+
+ protected CellKey(int row, int col) {
+ _row = row;
+ _col = col;
+ _hash = (17 * 37 + row) * 37 + col;
+ }
+
+ @Override
+ public int hashCode() {
+ return _hash;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (obj == null) return false;
+ // assumes other object is one of us, otherwise ClassCastException is thrown
+ final CellKey oKey = (CellKey) obj;
+ return _row == oKey._row && _col == oKey._col;
+ }
+ }
}