hedera-web/js/vn/basic-set.js

50 lines
758 B
JavaScript
Raw Normal View History

2016-12-23 08:57:49 +00:00
var Object = require ('./object');
var Set = require ('./set');
module.exports = new Class
({
Extends: Object
,Implements: Set
,Tag: 'vn-basic-set'
,initialize: function (props)
{
this._params = {};
this.parent (props);
}
/**
* Gets a value from the set.
*
* @param {String} paramName The parameter name
* @return {any} The value
*/
,get: function (paramName)
{
return this._params[paramName];
}
/**
* Sets a value on the set.
*
* @param {String} paramName The parameter name
* @param {any} value The new value
*/
,set: function (paramName, value)
{
this._params[paramName] = value;
this.changed ();
}
/**
* Resets all values.
*/
,reset: function ()
{
this._params = {};
this.changed ();
}
});