org.apache.poi.ss.util
Class CellRangeAddressBase
- java.lang.Object
-
- org.apache.poi.ss.util.CellRangeAddressBase
-
- Direct Known Subclasses:
- CellRangeAddress, CellRangeAddress8Bit
public abstract class CellRangeAddressBase extends java.lang.ObjectSee OOO documentation: excelfileformat.pdf sec 2.5.14 - 'Cell Range Address' Common subclass of 8-bit and 16-bit versions
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description intgetFirstColumn()intgetFirstRow()intgetLastColumn()intgetLastRow()intgetNumberOfCells()booleanisFullColumnRange()booleanisFullRowRange()booleanisInRange(int rowInd, int colInd)Determines if the given coordinates lie within the bounds of this range.voidsetFirstColumn(int firstCol)voidsetFirstRow(int firstRow)voidsetLastColumn(int lastCol)voidsetLastRow(int lastRow)java.lang.StringtoString()voidvalidate(SpreadsheetVersion ssVersion)Validate the range limits against the supplied version of Excel
-
-
-
Method Detail
-
validate
public void validate(SpreadsheetVersion ssVersion)
Validate the range limits against the supplied version of Excel- Parameters:
ssVersion- the version of Excel to validate against- Throws:
java.lang.IllegalArgumentException- if the range limits are outside of the allowed range
-
isFullColumnRange
public final boolean isFullColumnRange()
-
isFullRowRange
public final boolean isFullRowRange()
-
getFirstColumn
public final int getFirstColumn()
- Returns:
- column number for the upper left hand corner
-
getFirstRow
public final int getFirstRow()
- Returns:
- row number for the upper left hand corner
-
getLastColumn
public final int getLastColumn()
- Returns:
- column number for the lower right hand corner
-
getLastRow
public final int getLastRow()
- Returns:
- row number for the lower right hand corner
-
isInRange
public boolean isInRange(int rowInd, int colInd)Determines if the given coordinates lie within the bounds of this range.- Parameters:
rowInd- The row, 0-based.colInd- The column, 0-based.- Returns:
- True if the coordinates lie within the bounds, false otherwise.
-
setFirstColumn
public final void setFirstColumn(int firstCol)
- Parameters:
firstCol- column number for the upper left hand corner
-
setFirstRow
public final void setFirstRow(int firstRow)
- Parameters:
firstRow- row number for the upper left hand corner
-
setLastColumn
public final void setLastColumn(int lastCol)
- Parameters:
lastCol- column number for the lower right hand corner
-
setLastRow
public final void setLastRow(int lastRow)
- Parameters:
lastRow- row number for the lower right hand corner
-
getNumberOfCells
public int getNumberOfCells()
- Returns:
- the size of the range (number of cells in the area).
-
toString
public final java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-
DataMelt 3.0 © DataMelt by jWork.ORG