pip_services3_expressions.calculator.functions.FunctionCollection module
-
class
pip_services3_expressions.calculator.functions.FunctionCollection.
FunctionCollection
Bases:
pip_services3_expressions.calculator.functions.IFunctionCollection.IFunctionCollection
Implements a functions list.
-
add
(func: pip_services3_expressions.calculator.functions.IFunction.IFunction) Adds a new function to the collection.
- Parameters
func – a function to be added.
-
clear
() Clears the collection.
-
find_by_name
(name: str) → pip_services3_expressions.calculator.functions.IFunction.IFunction Finds function in the list by it’s name.
- Parameters
name – The function name to be found.
- Returns
A function or None if function was not found.
-
find_index_by_name
(name: str) → int Finds function index in the list by it’s name.
- Parameters
name – The function name to be found.
- Returns
Function index in the list or -1 if function was not found.
-
get
(index: int) → pip_services3_expressions.calculator.functions.IFunction.IFunction Get a function by its index.
- Parameters
index – a function index.
- Returns
a retrieved function.
-
get_all
() → List[pip_services3_expressions.calculator.functions.IFunction.IFunction] Get all functions stores in the collection
- Returns
a list with functions.
-
property
length
Gets a number of functions stored in the collection.
- Returns
a number of stored functions.
-