- All Implemented Interfaces:
Cloneable
Represents a formula.
-
Constructor Summary
Constructors
-
Method Summary
Creates a copy of the FormulaSyntaxTree
instance.
boolean
Determines whether the current FormulaSyntaxTree object is equal to another object.
Gets the root element of the syntax tree for this formula.
int
Returns the hash code for the FormulaSyntaxTree object.
Creates a new FormulaSyntaxTree
from a string
.
Creates a new FormulaSyntaxTree
from a string
.
final void
Sets the root element of the syntax tree for this formula.
Returns the text for this formula.
Returns the text for this formula, optionally specifies the formatting behavior.
-
Constructor Details
-
public FormulaSyntaxTree()
-
Method Details
-
getRoot
Gets the root element of the syntax tree for this formula.
- Returns:
- The root
SyntaxNode
of the formula syntax tree.
-
setRoot
Sets the root element of the syntax tree for this formula.
The root SyntaxNode
of the formula syntax tree.
-
Parse
Creates a new FormulaSyntaxTree
from a string
.
- Parameters:
text
- A string
that contains formula.
- Returns:
- A
FormulaSyntaxTree
populated from the string
thatcontains formula.
-
Parse
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
Returns the text for this formula.
- Overrides:
toString
in class Object
- Returns:
- A
string
containing the formula.
-
toString
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
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.