|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectedu.psu.geovista.app.spreadsheet.functions.Function
| Field Summary | |
protected Formula |
owner
|
| Constructor Summary | |
Function()
|
|
| Method Summary | |
protected static void |
checkParamsExist(Node func)
|
abstract java.lang.Number |
evaluate(Node node)
This should be implemented in each function. |
abstract java.lang.String |
getDescription()
Return the description of the function |
protected Node |
getFirst(Node param)
|
Formula |
getOwner()
|
static SelectionRange |
getRangeArea(Node node)
Jin: Only for those function whose arguments is set of range. |
protected float |
getSingleParameter(Node node)
This gets the first float number of a parameter list, for functions only accepting a single parameter such as ABS, COS
, etc. |
protected Function |
getSupportFuntion(java.lang.String fname,
Formula owner)
|
abstract java.lang.String |
getUsage()
Return the usage of the function |
protected boolean |
isRange(Node param)
|
static SelectionRange |
processColonNode(Node colonNode)
convert a colon node(which contain 2 ranges) into a SelectionRange |
boolean |
requireParams()
Whether this function requires parameters. |
void |
setOwner(Formula owner)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected Formula owner
| Constructor Detail |
public Function()
| Method Detail |
protected boolean isRange(Node param)
protected Node getFirst(Node param)
protected static void checkParamsExist(Node func)
throws ParserException
ParserException
protected float getSingleParameter(Node node)
throws ParserException,
NoReferenceException
ABS, COS
, etc.
node - the edu.psu.geovista.app.spreadsheet.formula unit
ParserException
NoReferenceException
public abstract java.lang.Number evaluate(Node node)
throws ParserException,
NoReferenceException
node - the function node starting with the funciton name
with a chain of parameters
ParserException
NoReferenceExceptionpublic abstract java.lang.String getUsage()
public abstract java.lang.String getDescription()
public boolean requireParams()
FunctionPI,
FunctionE
public static SelectionRange getRangeArea(Node node)
throws ParserException
node - the function node.
ParserException
public static SelectionRange processColonNode(Node colonNode)
throws ParserException
ParserException
protected Function getSupportFuntion(java.lang.String fname,
Formula owner)
public void setOwner(Formula owner)
public Formula getOwner()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||