PropertyCollection class
Represents collection of properties and their values.
Methods
clone() | Clones the collection. |
get |
Returns the property value in type String. The parameter must have the same type as String. Currently only String, int and bool are allowed. If the name is not available, the specified defaultValue is returned. |
merge |
Merges this set of properties into another, no overwrites. |
set |
Sets the String value of the parameter specified by name. |
Method Details
clone()
getProperty(PropertyId | string, string)
Returns the property value in type String. The parameter must have the same type as String. Currently only String, int and bool are allowed. If the name is not available, the specified defaultValue is returned.
function getProperty(key: PropertyId | string, def?: string)
Parameters
- key
-
PropertyId | string
The parameter name.
- def
-
string
The default value which is returned if the parameter is not available in the collection.
Returns
string
value of the parameter.
mergeTo(PropertyCollection)
Merges this set of properties into another, no overwrites.
function mergeTo(destinationCollection: PropertyCollection)
Parameters
- destinationCollection
- PropertyCollection
setProperty(string | PropertyId, string)
Sets the String value of the parameter specified by name.
function setProperty(key: string | PropertyId, value: string)
Parameters
- key
-
string | PropertyId
The parameter name.
- value
-
string
The value of the parameter.