public abstract class CellRangeAddressBase
extends java.lang.Object
Modifier | Constructor and Description |
---|---|
protected |
CellRangeAddressBase(int firstRow,
int lastRow,
int firstCol,
int lastCol) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object other) |
int |
getFirstColumn() |
int |
getFirstRow() |
int |
getLastColumn() |
int |
getLastRow() |
protected int |
getMaxColumn() |
protected int |
getMaxRow() |
protected int |
getMinColumn() |
protected int |
getMinRow() |
int |
getNumberOfCells() |
int |
hashCode() |
boolean |
intersects(CellRangeAddressBase other)
Determines whether or not this CellRangeAddress and the specified CellRangeAddress intersect.
|
boolean |
isFullColumnRange() |
boolean |
isFullRowRange() |
boolean |
isInRange(int rowInd,
int colInd)
Determines if the given coordinates lie within the bounds
of this range.
|
void |
setFirstColumn(int firstCol) |
void |
setFirstRow(int firstRow) |
void |
setLastColumn(int lastCol) |
void |
setLastRow(int lastRow) |
java.lang.String |
toString() |
void |
validate(SpreadsheetVersion ssVersion)
Validate the range limits against the supplied version of Excel
|
protected CellRangeAddressBase(int firstRow, int lastRow, int firstCol, int lastCol)
public void validate(SpreadsheetVersion ssVersion)
ssVersion
- the version of Excel to validate againstjava.lang.IllegalArgumentException
- if the range limits are outside of the allowed rangepublic final boolean isFullColumnRange()
public final boolean isFullRowRange()
public final int getFirstColumn()
public final int getFirstRow()
public final int getLastColumn()
public final int getLastRow()
public boolean isInRange(int rowInd, int colInd)
rowInd
- The row, 0-based.colInd
- The column, 0-based.public boolean intersects(CellRangeAddressBase other)
other
- a candidate cell range address to check for intersection with this rangepublic final void setFirstColumn(int firstCol)
firstCol
- column number for the upper left hand cornerpublic final void setFirstRow(int firstRow)
firstRow
- row number for the upper left hand cornerpublic final void setLastColumn(int lastCol)
lastCol
- column number for the lower right hand cornerpublic final void setLastRow(int lastRow)
lastRow
- row number for the lower right hand cornerpublic int getNumberOfCells()
public final java.lang.String toString()
toString
in class java.lang.Object
protected int getMinRow()
protected int getMaxRow()
protected int getMinColumn()
protected int getMaxColumn()
public boolean equals(java.lang.Object other)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
Copyright 2016 The Apache Software Foundation or its licensors, as applicable.