java.lang.Comparable<CellRef>
CellRefRange
public class CellRef extends org.apache.poi.ss.util.CellReference implements java.lang.Comparable<CellRef>
CellRef
is a subclass of the POI class
CellReference
that provides a correct equals
method and adds the concept of a default value.Modifier and Type | Field | Description |
---|---|---|
static java.lang.String |
DEF_DEFAULT_VALUE |
If no default value is given, this the default default value.
|
static java.lang.String |
DEFAULT_VALUE_IND |
The token expected in a cell reference with a default value.
|
Constructor | Description |
---|---|
CellRef(int pRow,
int pCol) |
|
CellRef(int pRow,
int pCol,
boolean pAbsRow,
boolean pAbsCol) |
|
CellRef(int pRow,
short pCol) |
|
CellRef(java.lang.String cellRef) |
|
CellRef(java.lang.String pSheetName,
int pRow,
int pCol,
boolean pAbsRow,
boolean pAbsCol) |
|
CellRef(org.apache.poi.ss.usermodel.Cell cell) |
Modifier and Type | Method | Description |
---|---|---|
int |
compareTo(CellRef other) |
Compares this
CellRef to another CellRef . |
boolean |
equals(java.lang.Object o) |
Checks whether this cell reference is equal to another object.
|
java.lang.String |
formatAsStringWithDef() |
Include any default value in the formatted string.
|
java.lang.String |
getDefaultValue() |
Returns the default value.
|
void |
setDefaultValue(java.lang.String defaultValue) |
Sets the default value.
|
cellReferenceIsWithinRange, classifyCellReference, convertColStringToIndex, convertNumToColString, formatAsString, getCellRefParts, getCol, getRow, getSheetName, hashCode, isColAbsolute, isColumnWithnRange, isPartAbsolute, isRowAbsolute, isRowWithnRange, toString
public static final java.lang.String DEF_DEFAULT_VALUE
public static final java.lang.String DEFAULT_VALUE_IND
public CellRef(java.lang.String cellRef)
public CellRef(int pRow, int pCol)
public CellRef(int pRow, short pCol)
public CellRef(org.apache.poi.ss.usermodel.Cell cell)
public CellRef(int pRow, int pCol, boolean pAbsRow, boolean pAbsCol)
public CellRef(java.lang.String pSheetName, int pRow, int pCol, boolean pAbsRow, boolean pAbsCol)
public boolean equals(java.lang.Object o)
null
.equals
in class org.apache.poi.ss.util.CellReference
o
- The other object.true
if equal, false
otherwise.public void setDefaultValue(java.lang.String defaultValue)
null
.defaultValue
- The default value.public java.lang.String getDefaultValue()
null
.public java.lang.String formatAsStringWithDef()
public int compareTo(CellRef other)
CellRef
to another CellRef
.
Comparison order: sheet names, row indexes, then column indexes.compareTo
in interface java.lang.Comparable<CellRef>
other
- Another CellRef
.CellRef
compares less than, equal to, or greater
than the other CellRef
.Copyright © 2012–2018 Jett Team. All rights reserved.