|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.poi.hssf.record.formula.Ptg
org.apache.poi.hssf.record.formula.ArrayPtg
public final class ArrayPtg
ArrayPtg - handles arrays The ArrayPtg is a little weird, the size of the Ptg when parsing initially only includes the Ptg sid and the reserved bytes. The next Ptg in the expression then follows. It is only after the "size" of all the Ptgs is met, that the ArrayPtg data is actually held after this. So Ptg.createParsedExpression keeps track of the number of ArrayPtg elements and need to parse the data upto the FORMULA record size.
Field Summary | |
---|---|
static int |
PLAIN_TOKEN_SIZE
The size of the plain tArray token written within the standard formula tokens (not including the data which comes after all formula tokens) |
static byte |
sid
|
Fields inherited from class org.apache.poi.hssf.record.formula.Ptg |
---|
CLASS_ARRAY, CLASS_REF, CLASS_VALUE, EMPTY_PTG_ARRAY |
Constructor Summary | |
---|---|
ArrayPtg(java.lang.Object[][] values2d)
|
|
ArrayPtg(RecordInputStream in)
|
Method Summary | |
---|---|
java.lang.String |
formatAsString()
|
short |
getColumnCount()
|
byte |
getDefaultOperandClass()
|
short |
getRowCount()
|
int |
getSize()
This size includes the size of the array Ptg plus the Array Ptg Token value size |
java.lang.Object[][] |
getTokenArrayValues()
|
boolean |
isBaseToken()
|
void |
readTokenValues(RecordInputStream in)
Read in the actual token (array) values. |
java.lang.String |
toFormulaString()
return a string representation of this token alone |
java.lang.String |
toString()
Overridden toString method to ensure object hash is not printed. |
void |
writeBytes(byte[] data,
int offset)
write this Ptg to a byte array |
int |
writeTokenValueBytes(byte[] data,
int offset)
|
Methods inherited from class org.apache.poi.hssf.record.formula.Ptg |
---|
clone, copy, createPtg, getBytes, getEncodedSize, getEncodedSizeWithoutArrayData, getPtgClass, getRVAType, readTokens, serializePtgs, setClass, toDebugString |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final byte sid
public static final int PLAIN_TOKEN_SIZE
Constructor Detail |
---|
public ArrayPtg(RecordInputStream in)
public ArrayPtg(java.lang.Object[][] values2d)
values2d
- array values arranged in rowsMethod Detail |
---|
public java.lang.Object[][] getTokenArrayValues()
public boolean isBaseToken()
isBaseToken
in class Ptg
false
if this token is classified as 'reference', 'value', or 'array'public void readTokenValues(RecordInputStream in)
public java.lang.String toString()
Ptg
toString
in class Ptg
public void writeBytes(byte[] data, int offset)
Ptg
writeBytes
in class Ptg
public int writeTokenValueBytes(byte[] data, int offset)
public short getRowCount()
public short getColumnCount()
public int getSize()
getSize
in class Ptg
public java.lang.String formatAsString()
public java.lang.String toFormulaString()
Ptg
toFormulaString
in class Ptg
public byte getDefaultOperandClass()
getDefaultOperandClass
in class Ptg
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |