util.Storage

Object storage by keys.

Constructor | Methods

Constructor

util.Storage()

Methods

Name Returns Description
add(key, object)

util.Storage

Adds an object to storage.

get(key)

Object

Returns object stored for the specified key, or the primary key, if this is not a string.

remove(key)

util.Storage

Deletes the "key: value" pair from storage.

Methods details

add

Adds an object to storage.

Returns self-reference.

Parameters:

Parameter Default value Description
key *

Type: String

Key.

object *

Type: Object

Stored object.

* Mandatory parameter/option.

get

{Object} get(key)

Returns object stored for the specified key, or the primary key, if this is not a string.

Parameters:

Parameter Default value Description
key *

Type: String|Object

Key.

* Mandatory parameter/option.

remove

{util.Storage} remove(key)

Deletes the "key: value" pair from storage.

Returns self-reference.

Parameters:

Parameter Default value Description
key *

Type: String

Key.

* Mandatory parameter/option.