public abstract class Ptg extends Object implements Serializable, Cloneable
Modifier and Type | Field and Description |
---|---|
static byte |
CLASS_ARRAY |
static byte |
CLASS_REF |
static byte |
CLASS_VALUE |
static Ptg[] |
EMPTY_PTG_ARRAY |
Constructor and Description |
---|
Ptg() |
Modifier and Type | Method and Description |
---|---|
Ptg |
clone() |
static Ptg |
createPtg(LittleEndianInput in) |
static Ptg |
createPtg(LittleEndianInput in,
SpreadsheetVersion version) |
static boolean |
doesFormulaReferToDeletedCell(Ptg[] ptgs) |
abstract byte |
getDefaultOperandClass() |
static int |
getEncodedSize(Ptg[] ptgs)
This method will return the same result as
getEncodedSizeWithoutArrayData(Ptg[])
if there are no array tokens present. |
static int |
getEncodedSize(Ptg[] ptgs,
SpreadsheetVersion version)
This method will return the same result as
getEncodedSizeWithoutArrayData(Ptg[])
if there are no array tokens present. |
static int |
getEncodedSizeWithoutArrayData(Ptg[] ptgs)
Used to calculate value that should be encoded at the start of the encoded Ptg token array;
|
static int |
getEncodedSizeWithoutArrayData(Ptg[] ptgs,
SpreadsheetVersion version) |
byte |
getPtgClass() |
char |
getRVAType()
Debug / diagnostic method to get this token's 'operand class' type.
|
abstract int |
getSize() |
abstract int |
getSize(SpreadsheetVersion version) |
abstract boolean |
isBaseToken() |
static Ptg[] |
readTokens(int size,
LittleEndianInput in)
Reads size bytes of the input stream, to create an array of Ptgs.
|
static Ptg[] |
readTokens(int size,
LittleEndianInput in,
SpreadsheetVersion version) |
static int |
serializePtgs(Ptg[] ptgs,
byte[] array,
int offset)
Writes the ptgs to the data buffer, starting at the specified offset.
|
static int |
serializePtgs(Ptg[] ptgs,
byte[] array,
int offset,
SpreadsheetVersion version) |
void |
setClass(byte thePtgClass) |
abstract String |
toFormulaString()
return a string representation of this token alone
|
String |
toString()
Overridden toString method to ensure object hash is not printed.
|
abstract void |
write(LittleEndianOutput out) |
abstract void |
write(LittleEndianOutput out,
SpreadsheetVersion version) |
public static final Ptg[] EMPTY_PTG_ARRAY
public static final byte CLASS_REF
public static final byte CLASS_VALUE
public static final byte CLASS_ARRAY
public static Ptg[] readTokens(int size, LittleEndianInput in)
public static Ptg[] readTokens(int size, LittleEndianInput in, SpreadsheetVersion version)
public static Ptg createPtg(LittleEndianInput in)
public static Ptg createPtg(LittleEndianInput in, SpreadsheetVersion version)
public static int getEncodedSize(Ptg[] ptgs)
getEncodedSizeWithoutArrayData(Ptg[])
if there are no array tokens present.public static int getEncodedSize(Ptg[] ptgs, SpreadsheetVersion version)
getEncodedSizeWithoutArrayData(Ptg[])
if there are no array tokens present.public static int getEncodedSizeWithoutArrayData(Ptg[] ptgs)
public static int getEncodedSizeWithoutArrayData(Ptg[] ptgs, SpreadsheetVersion version)
public static int serializePtgs(Ptg[] ptgs, byte[] array, int offset)
public static int serializePtgs(Ptg[] ptgs, byte[] array, int offset, SpreadsheetVersion version)
public abstract int getSize()
public abstract int getSize(SpreadsheetVersion version)
public abstract void write(LittleEndianOutput out)
public abstract void write(LittleEndianOutput out, SpreadsheetVersion version)
public abstract String toFormulaString()
public String toString()
public final void setClass(byte thePtgClass)
public final byte getPtgClass()
public final char getRVAType()
public abstract byte getDefaultOperandClass()
public abstract boolean isBaseToken()
false
if this token is classified as 'reference', 'value', or 'array'public static boolean doesFormulaReferToDeletedCell(Ptg[] ptgs)
public Ptg clone() throws CloneNotSupportedException
clone
in class Object
CloneNotSupportedException
Copyright © 2020. All rights reserved.