Interface IPLCellRange
-
- All Known Implementing Classes:
PLCellRange
public interface IPLCellRangeRead-only version of the cell range.- Author:
- Philip Helger
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default 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 intgetColumnCount()intgetFirstColumn()intgetFirstRow()intgetLastColumn()intgetLastRow()default intgetMaxColumn()default intgetMaxRow()default intgetMinColumn()default intgetMinRow()default longgetNumberOfCells()default intgetRowCount()default 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 Detail
-
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:
for checking if two ranges overlap
-
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
default boolean intersects(@Nonnull IPLCellRange aOther)
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:
for checking if a single cell intersects
-
getRowCount
@Nonnegative default int getRowCount()
- Returns:
- The number of effected rows. Always ≥ 0.
-
getColumnCount
@Nonnegative default int 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()
-
-