Interface IPLCellRange
- All Known Implementing Classes:
PLCellRange
public interface IPLCellRange
Read-only version of the cell range.
- Author:
- Philip Helger
-
Method Summary
Modifier and TypeMethodDescriptiondefault booleancontainsColumn(int nColumnIndex) Check if the column is in the specified cell rangedefault booleancontainsRow(int nRowIndex) Check if the row is in the specified cell rangedefault intintintintintdefault intdefault intdefault intdefault intdefault longdefault intdefault booleanintersects(IPLCellRange aOther) Determines whether or not thisIPLCellRangeand the specifiedIPLCellRangeintersect.default booleanisInRange(int nRowIndex, int nColumnIndex) Determines if the given coordinates lie within the bounds of this range.
-
Method Details
-
getFirstRow
int getFirstRow()- Returns:
- row number for the upper left hand corner
-
getLastRow
int getLastRow()- Returns:
- row number for the lower right hand corner
-
getFirstColumn
int getFirstColumn()- Returns:
- column number for the upper left hand corner
-
getLastColumn
int getLastColumn()- Returns:
- column number for the lower right hand corner
-
isInRange
default boolean isInRange(int nRowIndex, int nColumnIndex) Determines if the given coordinates lie within the bounds of this range.- Parameters:
nRowIndex- The row, 0-based.nColumnIndex- The column, 0-based.- Returns:
trueif the coordinates lie within the bounds,falseotherwise.- See Also:
-
containsRow
default boolean containsRow(int nRowIndex) Check if the row is in the specified cell range- Parameters:
nRowIndex- the row to check- Returns:
trueif the range contains the row at the passed index
-
containsColumn
default boolean containsColumn(int nColumnIndex) Check if the column is in the specified cell range- Parameters:
nColumnIndex- the column to check- Returns:
trueif the range contains the column at the passed index
-
intersects
Determines whether or not thisIPLCellRangeand the specifiedIPLCellRangeintersect.- Parameters:
aOther- a candidate cell range address to check for intersection with this range. May not benull.- Returns:
trueif this range and other range have at least 1 cell in common- See Also:
-
getRowCount
- Returns:
- The number of effected rows. Always ≥ 0.
-
getColumnCount
- Returns:
- The number of effected columns. Always ≥ 0.
-
getNumberOfCells
default long getNumberOfCells()- Returns:
- the size of the range (number of cells in the area).
-
getMinRow
default int getMinRow() -
getMaxRow
default int getMaxRow() -
getMinColumn
default int getMinColumn() -
getMaxColumn
default int getMaxColumn()
-