Package loci.poi.hssf.record.formula
Class ReferencePtg
- java.lang.Object
-
- loci.poi.hssf.record.formula.Ptg
-
- loci.poi.hssf.record.formula.ReferencePtg
-
-
Field Summary
Fields Modifier and Type Field Description static byte
sid
-
Fields inherited from class loci.poi.hssf.record.formula.Ptg
CLASS_ARRAY, CLASS_REF, CLASS_VALUE, ptgClass
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
ReferencePtg()
ReferencePtg(short row, short column, boolean isRowRelative, boolean isColumnRelative)
ReferencePtg(String cellref)
Takes in a String represnetation of a cell reference and fills out the numeric fields.ReferencePtg(RecordInputStream in)
Creates new ValueReferencePtg
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Object
clone()
short
getColumn()
short
getColumnRaw()
byte
getDefaultOperandClass()
String
getRefPtgName()
short
getRow()
Returns the row number as a short, which will be wrapped (negative) for values between 32769 and 65535int
getRowAsInt()
Returns the row number as an int, between 0 and 65535int
getSize()
boolean
isColRelative()
boolean
isRowRelative()
void
setColRelative(boolean rel)
void
setColumn(short col)
void
setColumnRaw(short col)
void
setRow(int row)
void
setRow(short row)
void
setRowRelative(boolean rel)
String
toFormulaString(Workbook book)
return a string representation of this token aloneString
toString()
Overridden toString method to ensure object hash is not printed.void
writeBytes(byte[] array, int offset)
write this Ptg to a byte array-
Methods inherited from class loci.poi.hssf.record.formula.Ptg
createParsedExpressionTokens, createPtg, getBytes, getPtgClass, serializePtgStack, setClass, toDebugString
-
-
-
-
Field Detail
-
sid
public static final byte sid
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ReferencePtg
protected ReferencePtg()
-
ReferencePtg
public ReferencePtg(String cellref)
Takes in a String represnetation of a cell reference and fills out the numeric fields.
-
ReferencePtg
public ReferencePtg(short row, short column, boolean isRowRelative, boolean isColumnRelative)
-
ReferencePtg
public ReferencePtg(RecordInputStream in)
Creates new ValueReferencePtg
-
-
Method Detail
-
getRefPtgName
public String getRefPtgName()
-
toString
public String toString()
Description copied from class:Ptg
Overridden toString method to ensure object hash is not printed. This helps get rid of gratuitous diffs when comparing two dumps Subclasses may output more relevant information by overriding this method
-
writeBytes
public void writeBytes(byte[] array, int offset)
Description copied from class:Ptg
write this Ptg to a byte array- Specified by:
writeBytes
in classPtg
-
setRow
public void setRow(short row)
-
setRow
public void setRow(int row)
-
getRow
public short getRow()
Returns the row number as a short, which will be wrapped (negative) for values between 32769 and 65535
-
getRowAsInt
public int getRowAsInt()
Returns the row number as an int, between 0 and 65535
-
isRowRelative
public boolean isRowRelative()
-
setRowRelative
public void setRowRelative(boolean rel)
-
isColRelative
public boolean isColRelative()
-
setColRelative
public void setColRelative(boolean rel)
-
setColumnRaw
public void setColumnRaw(short col)
-
getColumnRaw
public short getColumnRaw()
-
setColumn
public void setColumn(short col)
-
getColumn
public short getColumn()
-
toFormulaString
public String toFormulaString(Workbook book)
Description copied from class:Ptg
return a string representation of this token alone- Specified by:
toFormulaString
in classPtg
-
getDefaultOperandClass
public byte getDefaultOperandClass()
- Specified by:
getDefaultOperandClass
in classPtg
-
-