[]
        
(Showing Draft Content)

FormulaSyntaxTree

Class FormulaSyntaxTree

java.lang.Object
com.grapecity.documents.excel.expressions.FormulaSyntaxTree
All Implemented Interfaces:
Cloneable

public class FormulaSyntaxTree extends Object implements Cloneable
Represents a formula.
  • Constructor Details

    • FormulaSyntaxTree

      public FormulaSyntaxTree()
  • Method Details

    • getRoot

      public final SyntaxNode getRoot()
      Gets the root element of the syntax tree for this formula.
      Returns:
      The root SyntaxNode of the formula syntax tree.
    • setRoot

      public final void setRoot(SyntaxNode value)
      Sets the root element of the syntax tree for this formula.

      The root SyntaxNode of the formula syntax tree.

    • Parse

      public static FormulaSyntaxTree Parse(String text)
      Creates a new FormulaSyntaxTree from a string.
      Parameters:
      text - A string that contains formula.
      Returns:
      A FormulaSyntaxTree populated from the string thatcontains formula.
    • Parse

      public static FormulaSyntaxTree Parse(String text, ParseContext context)
      Creates a new FormulaSyntaxTree from a string.
      Parameters:
      text - A string that contains formula.
      context - A ParseContext that specifies base row, base columnand R1C1 reference style.
      Returns:
      A FormulaSyntaxTree populated from the string thatcontains formula.
    • toString

      public String toString()
      Returns the text for this formula.
      Overrides:
      toString in class Object
      Returns:
      A string containing the formula.
    • toString

      public final String toString(UnParseContext context)
      Returns the text for this formula, optionally specifies the formatting behavior.
      Parameters:
      context - An UnParseContext that specifies row, column and R1C1reference style.
      Returns:
      A string containing the formula.
    • clone

      public final FormulaSyntaxTree clone()
      Creates a copy of the FormulaSyntaxTree instance.
      Overrides:
      clone in class Object
      Returns:
      A copy of the FormulaSyntaxTree instance.
    • equals

      public boolean equals(Object obj)
      Determines whether the current FormulaSyntaxTree object is equal to another object.
      Overrides:
      equals in class Object
      Parameters:
      obj - The object to compare with the current FormulaSyntaxTree object.
      Returns:
      true if the current FormulaSyntaxTree object is equal to the specified object; otherwise, false.
    • hashCode

      public int hashCode()
      Returns the hash code for the FormulaSyntaxTree object.
      Overrides:
      hashCode in class Object
      Returns:
      The hash code for the FormulaSyntaxTree object.