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 boolean
contains(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.boolean
containsColumn(int col)
returns true if the specified col is in rangeboolean
containsRow(int row)
returns true if the specified row is in rangeValueEval
getAbsoluteValue(int row, int col)
TwoDEval
getColumn(int columnIndex)
int
getFirstColumn()
returns the 0-based index of the first col in this area.int
getFirstRow()
returns the 0-based index of the first row in this area.int
getFirstSheetIndex()
int
getHeight()
int
getLastColumn()
returns the 0-based index of the last col in this area.int
getLastRow()
returns the 0-based index of the last row in this area.int
getLastSheetIndex()
ValueEval
getNonEmptyCellValues()
SheetRangeEvaluator
getRefEvaluator()
ValueEval
getRelativeValue(int r, int c)
TwoDEval
getRow(int rowIndex)
ValueEval
getValue(int rowIndex, int columnIndex)
ValueEval
getValue(int sheetIndex, int rowIndex, int columnIndex)
int
getWidth()
boolean
isColumn()
boolean
isFiltered()
boolean
isHidden(int rowIndex, int columnIndex)
boolean
isRow()
boolean
isRowHidden(int rowIndex)
boolean
isSubTotal(int rowIndex, int columnIndex)
AreaEval
offset(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:AreaEval
returns 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:AreaEval
returns true if the specified col is in range- Specified by:
containsColumn
in interfaceAreaEval
-
containsRow
public boolean containsRow(int row)
Description copied from interface:AreaEval
returns true if the specified row is in range- Specified by:
containsRow
in interfaceAreaEval
-
getAbsoluteValue
public ValueEval getAbsoluteValue(int row, int col)
- Specified by:
getAbsoluteValue
in 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:AreaEval
returns the 0-based index of the first col in this area.- Specified by:
getFirstColumn
in interfaceAreaEval
-
getFirstRow
public int getFirstRow()
Description copied from interface:AreaEval
returns the 0-based index of the first row in this area.- Specified by:
getFirstRow
in interfaceAreaEval
-
getHeight
public int getHeight()
-
getLastColumn
public int getLastColumn()
Description copied from interface:AreaEval
returns the 0-based index of the last col in this area.- Specified by:
getLastColumn
in interfaceAreaEval
-
getLastRow
public int getLastRow()
Description copied from interface:AreaEval
returns the 0-based index of the last row in this area.- Specified by:
getLastRow
in interfaceAreaEval
-
getRelativeValue
public ValueEval getRelativeValue(int r, int c)
- Specified by:
getRelativeValue
in 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:AreaEval
Creates 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:
isSubTotal
in 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:
isRowHidden
in interfaceTwoDEval
- Returns:
- true if the row is hidden
- See Also:
Subtotal
-
isFiltered
public boolean isFiltered()
- Specified by:
isFiltered
in 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:
getFirstSheetIndex
in interfaceSheetRange
-
getLastSheetIndex
public int getLastSheetIndex()
- Specified by:
getLastSheetIndex
in interfaceSheetRange
-
getValue
public ValueEval getValue(int sheetIndex, int rowIndex, int columnIndex)
- Specified by:
getValue
in 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
-
-