Package org.yamcs.studio.data.formula
Class FormulaRegistry
java.lang.Object
org.yamcs.studio.data.formula.FormulaRegistry
The registry to add functions that will be used by the formula parser.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionfindFunctions
(String functionName, Integer nArguments) Finds the registered function with the given name and that can accept the given number of arguments.findFunctionSet
(String name) Returns the registered function set with the given name.findNamedConstant
(String constantName) Returns the value of the constant with the given namestatic FormulaRegistry
Returns the default formula registry.Returns the names of all the registered function sets.void
registerFormulaFunctionSet
(FormulaFunctionSet functionSet) Registers a formula set.
-
Constructor Details
-
FormulaRegistry
public FormulaRegistry()
-
-
Method Details
-
getDefault
Returns the default formula registry.- Returns:
- the default registry
-
registerFormulaFunctionSet
Registers a formula set.- Parameters:
functionSet
- a formula set
-
listFunctionSets
Returns the names of all the registered function sets.- Returns:
- the names of the registered function sets
-
findFunctionSet
Returns the registered function set with the given name.- Parameters:
name
- the function set name- Returns:
- the set or null
-
findFunctions
Finds the registered function with the given name and that can accept the given number of arguments.- Parameters:
functionName
- the name of the functionnArguments
- the number of the arguments- Returns:
- the matched functions
-
findNamedConstant
Returns the value of the constant with the given name- Parameters:
constantName
- the constant name- Returns:
- the value of the name
-