Class: ParamMap

eclairjs/ml/param.ParamMap

Creates an empty param map.

Constructor

new ParamMap()

A param to value map.
Source:

Methods

(static) apply(…paramPairs) → {module:eclairjs/ml/param.ParamMap}

Constructs a param map by specifying its entries.
Parameters:
Name Type Attributes Description
paramPairs module:eclairjs/ml/param.ParamPair <repeatable>
Source:
Returns:
Type
module:eclairjs/ml/param.ParamMap

(static) empty() → {module:eclairjs/ml/param.ParamMap}

Returns an empty param map.
Source:
Returns:
Type
module:eclairjs/ml/param.ParamMap

$plus$plus(other) → {module:eclairjs/ml/param.ParamMap}

Returns a new param map that contains parameters in this map and the given map, where the latter overwrites this if there exist conflicts.
Parameters:
Name Type Description
other module:eclairjs/ml/param.ParamMap
Source:
Returns:
Type
module:eclairjs/ml/param.ParamMap

apply(param) → {object}

Gets the value of the input param or its default value if it does not exist. Raises a NoSuchElementException if there is no value associated with the input param.
Parameters:
Name Type Description
param module:eclairjs/ml/param.Param
Source:
Returns:
Type
object

contains(param) → {Promise.<boolean>}

Checks whether a parameter is explicitly specified.
Parameters:
Name Type Description
param module:eclairjs/ml/param.Param
Source:
Returns:
Type
Promise.<boolean>

copy() → {module:eclairjs/ml/param.ParamMap}

Creates a copy of this param map.
Source:
Returns:
Type
module:eclairjs/ml/param.ParamMap

filter(parent) → {module:eclairjs/ml/param.ParamMap}

Filters this param map for the given parent.
Parameters:
Name Type Description
parent module:eclairjs/ml/param.Params
Source:
Returns:
Type
module:eclairjs/ml/param.ParamMap

get(param) → {object}

Optionally returns the value associated with a param.
Parameters:
Name Type Description
param module:eclairjs/ml/param.Param
Source:
Returns:
Type
object

getOrElse(param, default) → {object}

Returns the value associated with a param or a default value.
Parameters:
Name Type Description
param module:eclairjs/ml/param.Param
default object
Source:
Returns:
Type
object

put(paramPairs, value) → {module:eclairjs/ml/param.ParamMap}

Puts a list of param pairs (overwrites if the input params exists).
Parameters:
Name Type Description
paramPairs module:eclairjs/ml/param.ParamPair | module:eclairjs/ml/param.Param
value object
Source:
Returns:
Type
module:eclairjs/ml/param.ParamMap

remove(param) → {object}

Removes a key from this map and returns its value associated previously as an option.
Parameters:
Name Type Description
param module:eclairjs/ml/param.Param
Source:
Returns:
Type
object

size() → {Promise.<number>}

Number of param pairs in this map.
Source:
Returns:
Type
Promise.<number>

toArray() → {Array.<module:eclairjs/ml/param.ParamMap>}

Converts this param map to a array of param pairs.
Source:
Returns:
Type
Array.<module:eclairjs/ml/param.ParamMap>

toString() → {Promise.<string>}

Source:
Returns:
Type
Promise.<string>