Package org.apache.poi.ss.formula.eval
Class ArrayEval
- java.lang.Object
-
- org.apache.poi.ss.formula.eval.ArrayEval
-
- All Implemented Interfaces:
AreaEval,ValueEval,SheetRange,ThreeDEval,TwoDEval
public class ArrayEval extends Object implements AreaEval
Constant value array eval.- Author:
- henrichen
-
-
Constructor Summary
Constructors Constructor Description ArrayEval(ValueEval[][] srcvalues, int firstRow, int firstColumn, int lastRow, int lastColumn, SheetRangeEvaluator evaluator)ArrayEval(ArrayPtg ptg, SheetRangeEvaluator evaluator)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancontains(int row, int col)returns true if the cell at row and col specified as absolute indexes in the sheet is contained in this area.booleancontainsColumn(int col)returns true if the specified col is in rangebooleancontainsRow(int row)returns true if the specified row is in rangeValueEvalgetAbsoluteValue(int row, int col)TwoDEvalgetColumn(int columnIndex)intgetFirstColumn()returns the 0-based index of the first col in this area.intgetFirstRow()returns the 0-based index of the first row in this area.intgetFirstSheetIndex()intgetHeight()intgetLastColumn()returns the 0-based index of the last col in this area.intgetLastRow()returns the 0-based index of the last row in this area.intgetLastSheetIndex()ValueEvalgetNonEmptyCellValues()SheetRangeEvaluatorgetRefEvaluator()ValueEvalgetRelativeValue(int r, int c)TwoDEvalgetRow(int rowIndex)ValueEvalgetValue(int rowIndex, int columnIndex)ValueEvalgetValue(int sheetIndex, int rowIndex, int columnIndex)intgetWidth()booleanisColumn()booleanisFiltered()booleanisHidden(int rowIndex, int columnIndex)booleanisRow()booleanisRowHidden(int rowIndex)booleanisSubTotal(int rowIndex, int columnIndex)AreaEvaloffset(int relFirstRowIx, int relLastRowIx, int relFirstColIx, int relLastColIx)Creates an AreaEval offset by a relative amount from the upper left cell of this area
-
-
-
Constructor Detail
-
ArrayEval
public ArrayEval(ValueEval[][] srcvalues, int firstRow, int firstColumn, int lastRow, int lastColumn, SheetRangeEvaluator evaluator)
-
ArrayEval
public ArrayEval(ArrayPtg ptg, SheetRangeEvaluator evaluator)
-
-
Method Detail
-
contains
public boolean contains(int row, int col)Description copied from interface:AreaEvalreturns true if the cell at row and col specified as absolute indexes in the sheet is contained in this area.
-
containsColumn
public boolean containsColumn(int col)
Description copied from interface:AreaEvalreturns true if the specified col is in range- Specified by:
containsColumnin interfaceAreaEval
-
containsRow
public boolean containsRow(int row)
Description copied from interface:AreaEvalreturns true if the specified row is in range- Specified by:
containsRowin interfaceAreaEval
-
getAbsoluteValue
public ValueEval getAbsoluteValue(int row, int col)
- Specified by:
getAbsoluteValuein interfaceAreaEval- Returns:
- the ValueEval from within this area at the specified row and col index. Never
null(possiblyBlankEval). The specified indexes should be absolute indexes in the sheet and not relative indexes within the area.
-
getFirstColumn
public int getFirstColumn()
Description copied from interface:AreaEvalreturns the 0-based index of the first col in this area.- Specified by:
getFirstColumnin interfaceAreaEval
-
getFirstRow
public int getFirstRow()
Description copied from interface:AreaEvalreturns the 0-based index of the first row in this area.- Specified by:
getFirstRowin interfaceAreaEval
-
getHeight
public int getHeight()
-
getLastColumn
public int getLastColumn()
Description copied from interface:AreaEvalreturns the 0-based index of the last col in this area.- Specified by:
getLastColumnin interfaceAreaEval
-
getLastRow
public int getLastRow()
Description copied from interface:AreaEvalreturns the 0-based index of the last row in this area.- Specified by:
getLastRowin interfaceAreaEval
-
getRelativeValue
public ValueEval getRelativeValue(int r, int c)
- Specified by:
getRelativeValuein interfaceAreaEval- Returns:
- the ValueEval from within this area at the specified relativeRowIndex and
relativeColumnIndex. Never
null(possiblyBlankEval). The specified indexes should relative to the top left corner of this area.
-
getNonEmptyCellValues
public ValueEval getNonEmptyCellValues()
-
getWidth
public int getWidth()
-
offset
public AreaEval offset(int relFirstRowIx, int relLastRowIx, int relFirstColIx, int relLastColIx)
Description copied from interface:AreaEvalCreates an AreaEval offset by a relative amount from the upper left cell of this area
-
getColumn
public TwoDEval getColumn(int columnIndex)
-
getRow
public TwoDEval getRow(int rowIndex)
-
getValue
public ValueEval getValue(int rowIndex, int columnIndex)
-
isColumn
public boolean isColumn()
-
isRow
public boolean isRow()
-
isSubTotal
public boolean isSubTotal(int rowIndex, int columnIndex)- Specified by:
isSubTotalin interfaceTwoDEval- Returns:
- true if the cell at row and col is a subtotal
-
isHidden
public boolean isHidden(int rowIndex, int columnIndex)
-
isRowHidden
public boolean isRowHidden(int rowIndex)
- Specified by:
isRowHiddenin interfaceTwoDEval- Returns:
- true if the row is hidden
- See Also:
Subtotal
-
isFiltered
public boolean isFiltered()
- Specified by:
isFilteredin interfaceTwoDEval- Returns:
- true if the sheet of the area exists any auto filter or table filter which is applied.
- See Also:
Subtotal
-
getRefEvaluator
public SheetRangeEvaluator getRefEvaluator()
-
getFirstSheetIndex
public int getFirstSheetIndex()
- Specified by:
getFirstSheetIndexin interfaceSheetRange
-
getLastSheetIndex
public int getLastSheetIndex()
- Specified by:
getLastSheetIndexin interfaceSheetRange
-
getValue
public ValueEval getValue(int sheetIndex, int rowIndex, int columnIndex)
- Specified by:
getValuein interfaceThreeDEval- Parameters:
sheetIndex- sheet index (zero based)rowIndex- relative row index (zero based)columnIndex- relative column index (zero based)- Returns:
- element at the specified row and column position
-
-