Interface jQuery.sap.util.PropertiesModule: jquery.sap.properties


Represents a collection of string properties (key/value pairs).

Each key and its corresponding value in the collection is a string, keys are case-sensitive.

Use jQuery.sap.properties to create an instance of jQuery.sap.util.Properties.

The getProperty method can be used to retrieve a value from the collection, setProperty to store or change a value for a key and getKeys can be used to retrieve an array of all keys that are currently stored in the collection.


Since: 0.9.0.
Method Summary
clone()Creates and returns a clone of the property collection.
getKeys()Returns an array of all keys in the property collection.
getProperty(sKey, sDefaultValue?)Returns the value for the given key or null if the collection has no value for the key.
setProperty(sKey, sValue)Stores or changes the value for the given key in the collection.
Method Detail
Creates and returns a clone of the property collection.
Returns:
jQuery.sap.util.PropertiesA clone of the property collection
getKeys(): string[]
Returns an array of all keys in the property collection.
Returns:
string[]All keys in the property collection
getProperty(sKey, sDefaultValue?): string

Returns the value for the given key or null if the collection has no value for the key.

Optionally, a default value can be given which will be returned if the collection does not contain a value for the key; only non-empty default values are supported.

Parameters:
stringsKeyKey to return the value for
stringsDefaultValue?, Default: Optional, a default value that will be returned if the requested key is not in the collection
Returns:
stringValue for the given key or the default value or null if no default value or a falsy default value was given
setProperty(sKey, sValue)

Stores or changes the value for the given key in the collection.

If the given value is not a string, the collection won't be modified. The key is always cast to a string.

Parameters:
stringsKeyKey of the property
stringsValueString value for the key