Package org.apache.poi.ss.formula.eval
Class AreaEvalBase
- java.lang.Object
-
- org.apache.poi.ss.formula.eval.AreaEvalBase
-
- All Implemented Interfaces:
AreaEval
,ValueEval
,SheetRange
,ThreeDEval
,TwoDEval
- Direct Known Subclasses:
CacheAreaEval
,LazyAreaEval
public abstract class AreaEvalBase extends Object implements AreaEval
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AreaEvalBase(int firstRow, int firstColumn, int lastRow, int lastColumn)
protected
AreaEvalBase(AreaI ptg)
protected
AreaEvalBase(AreaI ptg, SheetRange sheets)
protected
AreaEvalBase(SheetRange sheets, int firstRow, int firstColumn, int lastRow, int lastColumn, boolean firstRowRel, boolean firstColRel, boolean lastRowRel, boolean lastColRel)
-
Method Summary
All Methods Instance Methods Abstract 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)
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()
abstract ValueEval
getRelativeValue(int relativeRowIndex, int relativeColumnIndex)
abstract ValueEval
getRelativeValue(int sheetIndex, int relativeRowIndex, int relativeColumnIndex)
ValueEval
getValue(int row, int col)
ValueEval
getValue(int sheetIndex, int row, int col)
int
getWidth()
boolean
isColumn()
boolean
isFirstColRelative()
boolean
isFirstRowRelative()
boolean
isLastColRelative()
boolean
isLastRowRelative()
boolean
isRow()
boolean
isRowHidden(int rowIndex)
boolean
isSubTotal(int rowIndex, int columnIndex)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.poi.ss.formula.TwoDEval
getColumn, getRow, isFiltered, isHidden
-
-
-
-
Constructor Detail
-
AreaEvalBase
protected AreaEvalBase(SheetRange sheets, int firstRow, int firstColumn, int lastRow, int lastColumn, boolean firstRowRel, boolean firstColRel, boolean lastRowRel, boolean lastColRel)
-
AreaEvalBase
protected AreaEvalBase(int firstRow, int firstColumn, int lastRow, int lastColumn)
-
AreaEvalBase
protected AreaEvalBase(AreaI ptg)
-
AreaEvalBase
protected AreaEvalBase(AreaI ptg, SheetRange sheets)
-
-
Method Detail
-
getFirstColumn
public final 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 final int getFirstRow()
Description copied from interface:AreaEval
returns the 0-based index of the first row in this area.- Specified by:
getFirstRow
in interfaceAreaEval
-
getLastColumn
public final 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 final int getLastRow()
Description copied from interface:AreaEval
returns the 0-based index of the last row in this area.- Specified by:
getLastRow
in interfaceAreaEval
-
getFirstSheetIndex
public int getFirstSheetIndex()
- Specified by:
getFirstSheetIndex
in interfaceSheetRange
-
getLastSheetIndex
public int getLastSheetIndex()
- Specified by:
getLastSheetIndex
in interfaceSheetRange
-
getAbsoluteValue
public final 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.
-
contains
public final 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.
-
containsRow
public final boolean containsRow(int row)
Description copied from interface:AreaEval
returns true if the specified row is in range- Specified by:
containsRow
in interfaceAreaEval
-
containsColumn
public final boolean containsColumn(int col)
Description copied from interface:AreaEval
returns true if the specified col is in range- Specified by:
containsColumn
in interfaceAreaEval
-
isColumn
public final boolean isColumn()
-
isRow
public final boolean isRow()
-
getHeight
public int getHeight()
-
getValue
public final ValueEval getValue(int row, int col)
-
getValue
public final ValueEval getValue(int sheetIndex, int row, int col)
- Specified by:
getValue
in interfaceThreeDEval
- Parameters:
sheetIndex
- sheet index (zero based)row
- relative row index (zero based)col
- relative column index (zero based)- Returns:
- element at the specified row and column position
-
getRelativeValue
public abstract ValueEval getRelativeValue(int relativeRowIndex, int relativeColumnIndex)
- 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.
-
getRelativeValue
public abstract ValueEval getRelativeValue(int sheetIndex, int relativeRowIndex, int relativeColumnIndex)
-
getWidth
public int getWidth()
-
isSubTotal
public boolean isSubTotal(int rowIndex, int columnIndex)
- Specified by:
isSubTotal
in interfaceTwoDEval
- Returns:
- whether cell at rowIndex and columnIndex is a subtotal. By default return false which means 'don't care about subtotals'
-
isRowHidden
public boolean isRowHidden(int rowIndex)
- Specified by:
isRowHidden
in interfaceTwoDEval
- Returns:
- false by default, meaning all rows are calculated
- See Also:
TwoDEval.isRowHidden(int)
-
isFirstRowRelative
public boolean isFirstRowRelative()
-
isFirstColRelative
public boolean isFirstColRelative()
-
isLastRowRelative
public boolean isLastRowRelative()
-
isLastColRelative
public boolean isLastColRelative()
-
-