public class Formula extends java.lang.Object implements GenericRecord
Modifier and Type | Method and Description |
---|---|
Formula |
copy() |
static Formula |
create(Ptg[] ptgs)
|
int |
getEncodedSize() |
int |
getEncodedTokenSize()
This method is often used when the formula length does not appear immediately before the encoded token data.
(当公式长度没有立即出现在编码的令牌数据之前时,通常使用此方法。)
|
CellReference |
getExpReference()
Gets the locator for the corresponding
SharedFormulaRecord ,
ArrayRecord or
TableRecord if this formula belongs to such a grouping.
(如果此公式属于此类分组,则获取相应 SharedFormulaRecord、ArrayRecord 或 TableRecord 的定位器。)
|
java.util.Map<java.lang.String,java.util.function.Supplier<?>> |
getGenericProperties() |
Ptg[] |
getTokens() |
static Ptg[] |
getTokens(Formula formula)
|
boolean |
isSame(Formula other) |
static Formula |
read(int encodedTokenLen, LittleEndianInput in)
Convenience method for
read(int, LittleEndianInput, int)
(read(int, LittleEndianInput, int) 的便捷方法)
|
static Formula |
read(int encodedTokenLen, LittleEndianInput in, int totalEncodedLen)
When there are no array constants present,
encodedTokenLen==
totalEncodedLen
(当不存在数组常量时,encodedTokenLen==totalEncodedLen)
|
void |
serialize(LittleEndianOutput out)
Writes The formula encoding is includes: ushort tokenDataLen tokenData arrayConstantData (if present)
(写入公式编码包括:ushort tokenDataLen tokenData arrayConstantData(如果存在))
|
void |
serializeArrayConstantData(LittleEndianOutput out) |
void |
serializeTokens(LittleEndianOutput out) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getGenericChildren, getGenericRecordType
public Formula(Formula other)
public static Formula read(int encodedTokenLen, LittleEndianInput in)
read(int, LittleEndianInput, int)
(read(int, LittleEndianInput, int) 的便捷方法)
public static Formula read(int encodedTokenLen, LittleEndianInput in, int totalEncodedLen)
encodedTokenLen
- number of bytes in the stream taken by the plain formula tokens
(encodedTokenLen - 普通公式令牌所采用的流中的字节数)
totalEncodedLen
- the total number of bytes in the formula (includes trailing encoding for array constants, but does not include 2 bytes for initial
ushort encodedTokenLen field.
(totalEncodedLen - 公式中的总字节数(包括数组常量的尾随编码,但不包括初始 ushort encodedTokenLen 字段的 2 个字节。)
null
.
(从流中读取的新公式对象。可能为空,从不为空。)
public Ptg[] getTokens()
public void serialize(LittleEndianOutput out)
public void serializeTokens(LittleEndianOutput out)
public void serializeArrayConstantData(LittleEndianOutput out)
public int getEncodedSize()
public int getEncodedTokenSize()
public static Formula create(Ptg[] ptgs)
ptgs
- may be
null
(ptgs - 可能为空)
null
(Possibly empty if the supplied
ptgs is
null
)
(从不为空(如果提供的 ptgs 为空,则可能为空))
public static Ptg[] getTokens(Formula formula)
formula
- may be
null
(公式 - 可能为空)
null
(if the supplied
formula is
null
)
(可能为空(如果提供的公式为空))
public Formula copy()
public CellReference getExpReference()
SharedFormulaRecord
,
ArrayRecord
or
TableRecord
if this formula belongs to such a grouping. The
CellReference
returned by this method will match the top left corner of the range of that grouping. The return value is usually not the same as the location of the cell containing this formula.
(如果此公式属于此类分组,则获取相应 SharedFormulaRecord、ArrayRecord 或 TableRecord 的定位器。此方法返回的 CellReference 将匹配该分组范围的左上角。返回值通常与包含此公式的单元格的位置不同。)
null
if this formula is not part of an array or shared formula.
(该公式所属的数组公式或共享公式的 firstRow & firstColumn。如果此公式不是数组或共享公式的一部分,则为 null。)
public boolean isSame(Formula other)
public java.util.Map<java.lang.String,java.util.function.Supplier<?>> getGenericProperties()
getGenericProperties
in interface
GenericRecord
(接口 GenericRecord 中的 getGenericProperties)
Copyright 2021 The Apache Software Foundation or its licensors, as applicable.