public class FormulaParser
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
FORMULA_TYPE_ARRAY |
static int |
FORMULA_TYPE_CELL |
static int |
FORMULA_TYPE_CONDFOMRAT |
static int |
FORMULA_TYPE_NAMEDRANGE |
static int |
FORMULA_TYPE_SHARED |
Constructor and Description |
---|
FormulaParser(java.lang.String formula,
Workbook book)
Create the formula parser, with the string that is to be
parsed against the supplied workbook.
|
Modifier and Type | Method and Description |
---|---|
Ptg[] |
getRPNPtg()
API call to retrive the array of Ptgs created as
a result of the parsing
|
Ptg[] |
getRPNPtg(int formulaType) |
void |
parse()
API call to execute the parsing of the formula
|
java.lang.String |
toFormulaString(java.util.List lptgs)
Convience method which takes in a list then passes it to the
other toFormulaString signature.
|
java.lang.String |
toFormulaString(Ptg[] ptgs)
Static method to convert an array of Ptgs in RPN order
to a human readable string format in infix mode.
|
static java.lang.String |
toFormulaString(Workbook book,
java.util.List lptgs)
Convience method which takes in a list then passes it to the
other toFormulaString signature.
|
static java.lang.String |
toFormulaString(Workbook book,
Ptg[] ptgs)
Static method to convert an array of Ptgs in RPN order
to a human readable string format in infix mode.
|
java.lang.String |
toString()
toString on the parser instance returns the RPN ordered list of tokens
Useful for testing
|
public static int FORMULA_TYPE_CELL
public static int FORMULA_TYPE_SHARED
public static int FORMULA_TYPE_ARRAY
public static int FORMULA_TYPE_CONDFOMRAT
public static int FORMULA_TYPE_NAMEDRANGE
public FormulaParser(java.lang.String formula, Workbook book)
public void parse()
public Ptg[] getRPNPtg()
public Ptg[] getRPNPtg(int formulaType)
public static java.lang.String toFormulaString(Workbook book, java.util.List lptgs)
book
- workbook for 3D and named referenceslptgs
- list of Ptg, can be null or emptypublic java.lang.String toFormulaString(java.util.List lptgs)
lptgs
- list of Ptg, can be null or emptypublic static java.lang.String toFormulaString(Workbook book, Ptg[] ptgs)
book
- workbook for named and 3D referencesptgs
- array of Ptg, can be null or emptypublic java.lang.String toFormulaString(Ptg[] ptgs)
ptgs
- array of Ptg, can be null or emptypublic java.lang.String toString()
toString
in class java.lang.Object
Copyright © 2014 Open Microscopy Environment