forked from verdnatura/hedera-web
64 lines
938 B
JavaScript
64 lines
938 B
JavaScript
|
|
module.exports = new Class
|
|
({
|
|
Properties:
|
|
{
|
|
/**
|
|
* The internal object with the params.
|
|
*/
|
|
params:
|
|
{
|
|
type: Object
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Gets a value from the set.
|
|
*
|
|
* @param {String} field The field name
|
|
* @return {*} The field value
|
|
*/
|
|
,get: function () {}
|
|
|
|
/**
|
|
* Sets a value on the set.
|
|
*
|
|
* @param {String} field The field name
|
|
* @param {*} value The new field value
|
|
*/
|
|
,set: function () {}
|
|
|
|
/**
|
|
* Returns an array with the set keys.
|
|
*
|
|
* @return {Array} The set keys
|
|
*/
|
|
,keys: function () {}
|
|
|
|
/**
|
|
* Emits the 'change' signal on the set.
|
|
*/
|
|
,changed: function ()
|
|
{
|
|
this.signalEmit ('change');
|
|
}
|
|
|
|
/**
|
|
* Copies all values from another set.
|
|
*
|
|
* @param {Set} source The source set
|
|
*/
|
|
,assign: function (source, keys)
|
|
{
|
|
if (!keys)
|
|
keys = source.keys ();
|
|
|
|
for (var i = 0; i < keys.length; i++)
|
|
{
|
|
var key = keys[i];
|
|
this.set (key, source.get (key));
|
|
}
|
|
}
|
|
});
|
|
|