Note
Access to this page requires authorization. You can try signing in or .
Access to this page requires authorization. You can try .
FunctionTable class
- Package:
- adaptive-expressions
FunctionTable is a dictionary which merges BuiltinFunctions.Functions with a CustomDictionary.
Properties
| isReadOnly | Gets a value indicating whether the FunctionTable is readonly. |
| size | Gets the total number of ExpressionFunctions.standardFunctions and user . |
Methods
| add(string, customFunction) | Inserts a mapping of a string key to ExpressionEvaluator into FunctionTable. |
| add(string, ExpressionEvaluator) | Inserts a mapping of a string key to ExpressionEvaluator into FunctionTable. |
| add({ key: string, value: ExpressionEvaluator }) | Inserts a mapping of a string key to ExpressionEvaluator into FunctionTable. |
| clear() | Clears the user . |
| delete(string) | Deletes a specified key from user . |
| entries() | Returns an iterable of key, value pairs for every entry in the map. Not implemented. |
| forEach((value: ExpressionEvaluator, key: string, map: Map<string, ExpressionEvaluator>) => void, any) | Operates on each element of the ExpressionFunctions.standardFunctions. Not implemented. |
| get(string) | Gets a value of ExpressionEvaluator corresponding to the given key. |
| has(string) | Determines if the FunctionTable has a given string key. |
| keys() | Gets a collection of string values that represent the keys of the ExpressionFunctions.standardFunctions. |
| set(string, ExpressionEvaluator) | Sets a value of ExpressionEvaluator corresponding to the given key. |
| values() | Gets a collection of ExpressionEvaluator which is the value of the StandardFunctions. |
Property Details
isReadOnly
Gets a value indicating whether the FunctionTable is readonly.
boolean isReadOnly
Property Value
boolean
A boolean value indicating whether the FunctionTable is readonly.
size
Gets the total number of ExpressionFunctions.standardFunctions and user .
number size
Property Value
number
An integer value.
Method Details
add(string, customFunction)
Inserts a mapping of a string key to ExpressionEvaluator into FunctionTable.
function add(key: string, value: customFunction)
Parameters
- key
-
string
- value
-
customFunction
add(string, ExpressionEvaluator)
Inserts a mapping of a string key to ExpressionEvaluator into FunctionTable.
function add(key: string, value: ExpressionEvaluator)
Parameters
- key
-
string
- value
- ExpressionEvaluator
add({ key: string, value: ExpressionEvaluator })
Inserts a mapping of a string key to ExpressionEvaluator into FunctionTable.
function add(item: { key: string, value: ExpressionEvaluator })
Parameters
- item
-
{ key: string, value: ExpressionEvaluator }
clear()
Clears the user .
function clear()
delete(string)
Deletes a specified key from user .
function delete(key: string): boolean
Parameters
- key
-
string
A string key of function name.
Returns
boolean
A boolean value indicating whether the key is successfully deleted.
entries()
Returns an iterable of key, value pairs for every entry in the map. Not implemented.
function entries(): IterableIterator<[string, ExpressionEvaluator]>
Returns
IterableIterator<[string, ExpressionEvaluator]>
forEach((value: ExpressionEvaluator, key: string, map: Map<string, ExpressionEvaluator>) => void, any)
Operates on each element of the ExpressionFunctions.standardFunctions. Not implemented.
function forEach(_callbackfn: (value: ExpressionEvaluator, key: string, map: Map<string, ExpressionEvaluator>) => void, _thisArg?: any)
Parameters
- _callbackfn
-
(value: ExpressionEvaluator, key: string, map: Map<string, ExpressionEvaluator>) => void
Callback function.
- _thisArg
-
any
Optional. This args.
get(string)
Gets a value of ExpressionEvaluator corresponding to the given key.
function get(key: string): ExpressionEvaluator
Parameters
- key
-
string
A string value of function name.
Returns
has(string)
Determines if the FunctionTable has a given string key.
function has(key: string): boolean
Parameters
- key
-
string
A string key.
Returns
boolean
True if the key is contained, otherwise returns False.
keys()
Gets a collection of string values that represent the keys of the ExpressionFunctions.standardFunctions.
function keys(): IterableIterator<string>
Returns
IterableIterator<string>
A list of string values.
set(string, ExpressionEvaluator)
Sets a value of ExpressionEvaluator corresponding to the given key.
function set(key: string, value: ExpressionEvaluator): this
Parameters
- key
-
string
A string value of function name.
- value
- ExpressionEvaluator
The value to set for the ExpressionEvaluator.
Returns
this
The value of the ExpressionEvaluator.
values()
Gets a collection of ExpressionEvaluator which is the value of the StandardFunctions.
function values(): IterableIterator<ExpressionEvaluator>
Returns
IterableIterator<ExpressionEvaluator>
A list of ExpressionEvaluator.
