public class HeaderCellRange extends CellRange
Constructor and Description |
---|
HeaderCellRange(HeaderCellKey key)
Creates a single-cell range (a range consisting of a single header cell).
|
HeaderCellRange(HeaderCellKey startKey,
HeaderCellIndex startIndex,
HeaderCellKey endKey,
HeaderCellIndex endIndex)
Creates a multi-cell range.
|
HeaderCellRange(HeaderCellKey startKey,
HeaderCellKey endKey)
Deprecated.
This constructor can have severe performance consequences.
Use the 4-arg constructor instead.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object object)
Indicates whether the specified object is equal to this range.
|
HeaderCellIndex |
getEndIndex(DataModel model)
Returns the end index of a multi-cell range, or null for a
single-cell range.
|
HeaderCellKey |
getEndKey()
Returns the end key of a multi-cell range, or null for a single-cell range.
|
java.lang.Object |
getPrivateData()
For use by pivot table only.
|
HeaderCellIndex |
getStartIndex(DataModel model)
Returns the start index of a multi-cell range, or the index of
a single-cell range.
|
HeaderCellKey |
getStartKey()
Returns the start key of a multi-cell range, or the key of a single-cell range.
|
int |
hashCode() |
boolean |
isSingleCell()
Indicates whether this range consists of a single cell or multiple cells.
|
public HeaderCellRange(HeaderCellKey key)
key
- the key of the header cell to include in this range@Deprecated public HeaderCellRange(HeaderCellKey startKey, HeaderCellKey endKey)
startKey
- the key of the first header cell in this range, inclusiveendKey
- the key of the last header cell in this range, inclusivepublic HeaderCellRange(HeaderCellKey startKey, HeaderCellIndex startIndex, HeaderCellKey endKey, HeaderCellIndex endIndex)
startKey
and endKey
indicate the first and last header cells in the range, inclusive. These
header cells must start in the same layer.
If startKey.equals(endKey)
, a single-cell range is constructed, exactly as
if the single-argument constructor had been called.
The start and end indexes should be the indexes corresponding to the start
and end keys. Like the keys, they should not be null. The caller is
advised to use this constructor only if it can obtain the required indexes
cheaply.startKey
- the key of the first header cell in this range, inclusivestartIndex
- the index of the first header cell in this range, inclusiveendKey
- the key of the last header cell in this range, inclusiveendIndex
- the index of the last header cell in this range, inclusivepublic HeaderCellKey getStartKey()
getStartKey
in class CellRange
public HeaderCellKey getEndKey()
public boolean isSingleCell()
isSingleCell
in class CellRange
true
if this range consists of a single cell; false
otherwisepublic HeaderCellIndex getStartIndex(DataModel model)
getStartIndex
, or internally by the Pivot Table),
this method computes the start index from the start key, stores that index
for future use, and returns that index.
Thus, the first call to this method can be expensive.getStartIndex
in class CellRange
public HeaderCellIndex getEndIndex(DataModel model)
getEndIndex
, or internally by the Pivot Table),
this method computes the end index from the end key, stores that index
for future use, and returns that index.
Thus, the first call to this method can be expensive.getEndIndex
in class CellRange
public java.lang.Object getPrivateData()
public boolean equals(java.lang.Object object)
HeaderCellRange
, this method returns false
. Otherwise,
if both ranges are single-cell ranges whose start keys are equal, this
method returns true
. Otherwise, if both ranges are multi-cell ranges
whose start keys are equal and whose end keys are equal, this method returns
true
. Otherwise this method returns false
. This method ignores the
start index and end index, since they are at best redundant and at worst
not set or out of date.equals
in class java.lang.Object
object
- the object to test for equalitytrue
if the specified object is equal to this object; false
otherwisepublic int hashCode()
hashCode
in class java.lang.Object