Class FormulaRecordAggregate

  • All Implemented Interfaces:
    CellValueRecordInterface

    public final class FormulaRecordAggregate
    extends RecordAggregate
    implements CellValueRecordInterface
    The formula record aggregate is used to join together the formula record and it's (optional) string record and (optional) Shared Formula Record (template reads, excel optimization).
    • Method Detail

      • getStringRecord

        public StringRecord getStringRecord()
        debug only TODO - encapsulate
      • setRow

        public void setRow​(int row)
        Specified by:
        setRow in interface CellValueRecordInterface
        Parameters:
        row - the row this cell occurs within
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • visitContainedRecords

        public void visitContainedRecords​(RecordAggregate.RecordVisitor rv)
        Description copied from class: RecordAggregate
        Visit each of the atomic BIFF records contained in this RecordAggregate in the order that they should be written to file. Implementors may or may not return the actual Records being used to manage POI's internal implementation. Callers should not assume either way, and therefore only attempt to modify those Records after cloning
        Specified by:
        visitContainedRecords in class RecordAggregate
      • getStringValue

        public java.lang.String getStringValue()
      • setCachedStringResult

        public void setCachedStringResult​(java.lang.String value)
      • setCachedBooleanResult

        public void setCachedBooleanResult​(boolean value)
      • setCachedErrorResult

        public void setCachedErrorResult​(int errorCode)
      • setCachedErrorResult

        public void setCachedErrorResult​(FormulaError error)
      • setCachedDoubleResult

        public void setCachedDoubleResult​(double value)
      • getFormulaTokens

        public Ptg[] getFormulaTokens()
      • setParsedExpression

        public void setParsedExpression​(Ptg[] ptgs)
        Also checks for a related shared formula and unlinks it if found
      • unlinkSharedFormula

        public void unlinkSharedFormula()
      • notifyFormulaChanging

        public void notifyFormulaChanging()
        Should be called by any code which is either deleting this formula cell, or changing its type. This method gives the aggregate a chance to unlink any shared formula that may be involved with this cell formula.
      • isPartOfArrayFormula

        public boolean isPartOfArrayFormula()
      • removeArrayFormula

        public CellRangeAddress removeArrayFormula​(int rowIndex,
                                                   int columnIndex)
        Removes an array formula
        Returns:
        the range of the array formula containing the specified cell. Never null