Parameters class

Contains map with execution parameters.

In general, this map may contain non-serializable values. And in contrast with other maps, its getters and setters support dot notation and able to access properties in the entire object graph.

This class is often use to pass execution and notification arguments, and parameterize classes before execution.

See IParameterized See AnyValueMap

Inheritance

Constructors

Parameters([dynamic values])
Creates a new instance of the map and assigns its value.
Parameters.fromJson(Map<String, dynamic> json)
factory

Properties

entries Iterable<MapEntry>
The map entries of this.
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
isEmpty bool
Whether there is no key/value pair in the map.
no setterinherited
isNotEmpty bool
Whether there is at least one key/value pair in the map.
no setterinherited
keys Iterable
The keys of this.
no setterinherited
length int
The number of key/value pairs in the map.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
values Iterable
The values of this.
no setterinherited

Methods

addAll(Map other) → void
Adds all key/value pairs of other to this map.
inherited
addEntries(Iterable<MapEntry> newEntries) → void
Adds all key/value pairs of newEntries to this map.
inherited
append(dynamic map) → void
Appends new elements to this map.
inherited
assignTo(dynamic value) → void
Assigns (copies over) properties from the specified value to this map.
cast<RK, RV>() Map<RK, RV>
Provides a view of this map as having RK keys and RV instances, if necessary.
inherited
clear() → void
Clears this map by removing all its elements.
inherited
clone() → dynamic
Creates a binary clone of this object.
inherited
containsKey(Object? key) bool
Checks if this map contains an element with specified key.
override
containsValue(Object? value) bool
Whether this map contains the given value.
inherited
forEach(void action(dynamic key, dynamic value)) → void
Applies action to each key/value pair of the map.
inherited
fromJson(Map<String, dynamic> json) → void
Initialize this object from JSON Map object
inherited
get(String? key) → dynamic
Gets a map element specified by its key.
override
getAsArray(String key) AnyValueArray
Converts map element into an AnyValueArray or returns empty AnyValueArray if conversion is not possible.
inherited
getAsArrayWithDefault(String key, AnyValueArray defaultValue) AnyValueArray
Converts map element into an AnyValueArray or returns default value if conversion is not possible.
inherited
getAsBoolean(String key) bool
Converts map element into a boolean or returns false if conversion is not possible.
inherited
getAsBooleanWithDefault(String key, bool defaultValue) bool
Converts map element into a boolean or returns default value if conversion is not possible.
inherited
getAsDateTime(String key) DateTime
Converts map element into a DateTime or returns the current date if conversion is not possible.
inherited
getAsDateTimeWithDefault(String key, DateTime defaultValue) DateTime
Converts map element into a DateTime or returns default value if conversion is not possible.
inherited
getAsDouble(String key) double
Converts map element into a double or returns 0 if conversion is not possible.
inherited
getAsDoubleWithDefault(String key, double defaultValue) double
Converts map element into a double or returns default value if conversion is not possible.
inherited
getAsDuration(String key) Duration
Converts map element into a Duration or returns the current date if conversion is not possible.
inherited
getAsDurationWithDefault(String key, Duration defaultValue) Duration
Converts map element into a Duration or returns default value if conversion is not possible.
inherited
getAsFloat(String key) double
Converts map element into a float or returns 0 if conversion is not possible.
inherited
getAsFloatWithDefault(String key, double defaultValue) double
Converts map element into a flot or returns default value if conversion is not possible.
inherited
getAsInteger(String key) int
Converts map element into an integer or returns 0 if conversion is not possible.
inherited
getAsIntegerWithDefault(String key, int defaultValue) int
Converts map element into an integer or returns default value if conversion is not possible.
inherited
getAsLong(String key) int
Converts map element into a long or returns 0 if conversion is not possible.
inherited
getAsLongWithDefault(String key, int defaultValue) int
Converts map element into a long or returns default value if conversion is not possible.
inherited
getAsMap(String key) AnyValueMap
Converts map element into an AnyValueMap or returns empty AnyValueMap if conversion is not possible.
inherited
getAsMapWithDefault(String key, AnyValueMap defaultValue) AnyValueMap
Converts map element into an AnyValueMap or returns default value if conversion is not possible.
inherited
getAsNullableArray(String key) AnyValueArray?
Converts map element into an AnyValueArray or returns null if conversion is not possible.
inherited
getAsNullableBoolean(String key) bool?
Converts map element into a boolean or returns null if conversion is not possible.
inherited
getAsNullableDateTime(String key) DateTime?
Converts map element into a DateTime or returns null if conversion is not possible.
inherited
getAsNullableDouble(String key) double?
Converts map element into a double or returns null if conversion is not possible.
inherited
getAsNullableDuration(String key) Duration?
Converts map element into a Duration or returns null if conversion is not possible.
inherited
getAsNullableFloat(String key) double?
Converts map element into a float or returns null if conversion is not possible.
inherited
getAsNullableInteger(String key) int?
Converts map element into an integer or returns null if conversion is not possible.
inherited
getAsNullableLong(String key) int?
Converts map element into a long or returns null if conversion is not possible.
inherited
getAsNullableMap(String key) AnyValueMap?
Converts map element into an AnyValueMap or returns null if conversion is not possible.
inherited
getAsNullableParameters(String key) Parameters?
Converts map element into an Parameters or returns null if conversion is not possible.
getAsNullableString(String key) String?
Converts map element into a String or returns null if conversion is not possible.
inherited
getAsNullableType<T>(TypeCode type, String key) → T?
Converts map element into a value defined by specied typecode. If conversion is not possible it returns null.
inherited
getAsObject([String? key]) → dynamic
Gets the value stored in map element without any conversions. When element key is not defined it returns the entire map value.
inherited
getAsParameters(String key) Parameters
Converts map element into an Parameters or returns empty Parameters if conversion is not possible.
getAsParametersWithDefault(String key, Parameters defaultValue) Parameters
Converts map element into an Parameters or returns default value if conversion is not possible.
getAsString(String key) String
Converts map element into a String or returns '' if conversion is not possible.
inherited
getAsStringWithDefault(String key, String defaultValue) String
Converts map element into a String or returns default value if conversion is not possible.
inherited
getAsType<T>(TypeCode type, String key) → T?
Converts map element into a value defined by specied typecode. If conversion is not possible it returns default value for the specified type.
inherited
getAsTypeWithDefault<T>(TypeCode type, String key, T defaultValue) → T
Converts map element into a value defined by specied typecode. If conversion is not possible it returns default value.
inherited
getAsValue(String key) AnyValue
Converts map element into an AnyValue or returns an empty AnyValue if conversion is not possible.
inherited
getKeys() List<String>
Gets keys of all elements stored in this map.
inherited
getValue() Map
Gets an map with values.
inherited
innerValue() → dynamic
Returned inner values in Map object
inherited
map<K2, V2>(MapEntry<K2, V2> transform(dynamic key, dynamic value)) Map<K2, V2>
Returns a new map where all entries of this map are transformed by the given convert function.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
omit(List<String> paths) Parameters
Omits selected parameters from this Parameters and returns the rest as a new Parameters object.
override(Parameters? parameters, [bool recursive = false]) Parameters
Overrides parameters with new values from specified Parameters and returns a new Parameters object.
pick(List<String> paths) Parameters
Picks select parameters from this Parameters and returns them as a new Parameters object.
put(String? key, dynamic value) → void
Puts a new value into map element specified by its key.
override
putIfAbsent(dynamic key, dynamic ifAbsent()) → dynamic
Look up the value of key, or add a new entry if it isn't there.
inherited
remove(dynamic key) → void
Removes a map element specified by its key
inherited
removeWhere(bool test(dynamic key, dynamic value)) → void
Removes all entries of this map that satisfy the given test.
inherited
setAsObject(dynamic key, [dynamic value]) → void
Sets a new value to map element specified by its index. When the index is not defined, it resets the entire map value. This method has double purpose because method overrides are not supported in JavaScript.
inherited
setDefaults(Parameters defaultParameters, [bool recursive = false]) Parameters
Set default values from specified Parameters and returns a new Parameters object.
toJson() Map
Returned JSON Map object from values of this object
inherited
toJsonString() String?
Converts this map to JSON object.
toString() String
Gets a String representation of the object. The result is a semicolon-separated list of key-value pairs as 'key1=value1;key2=value2;key=value3'
inherited
update(dynamic key, dynamic update(dynamic value), {dynamic ifAbsent()?}) → dynamic
Updates the value for the provided key.
inherited
updateAll(dynamic update(dynamic key, dynamic value)) → void
Updates all values.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited
operator [](dynamic key) → dynamic
The value for the given key, or null if key is not in the map.
inherited
operator []=(dynamic key, dynamic value) → void
Associates the key with the given value.
inherited

Static Methods

fromConfig(ConfigParams? config) Parameters
Creates new Parameters from ConfigMap object.
fromJsonString(String json) Parameters
Creates new Parameters from JSON object.
fromTuples(List tuples) Parameters
Creates a new Parameters object filled with provided key-value pairs called tuples. Tuples parameters contain a sequence of key1, value1, key2, value2, ... pairs.
override
fromValue(dynamic value) Parameters
Creates a new Parameters object filled with key-value pairs from specified object.
override
mergeParams(List<Parameters> parameters) Parameters
Merges two or more Parameters into one. The following Parameters override previously defined parameters.