pip_services3_expressions.calculator.functions.IFunctionCollection module

class pip_services3_expressions.calculator.functions.IFunctionCollection.IFunctionCollection

Bases: object

Defines 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()pip_services3_expressions.calculator.functions.IFunction.IFunction

Get all functions stores in the collection

Returns

a list with functions.

length: int
remove(index: int)

Removes a function by its index.

Parameters

index – a index of the function to be removed.

remove_by_name(name: str)

Removes function by it’s name.

Parameters

name – The function name to be removed.