(function() {
/**
* @property {string[]} _s
* @property {number} length
*/
Help4.widget.monitor.Store = class {
/** @constructor */
constructor() {
this.clean();
}
/** destructor */
destroy() {
delete this._s;
delete this.length;
this.isDestroyed = () => true;
}
/** @returns {boolean} */
isDestroyed() {
return false;
}
/** @param {string} string */
push(...string) {
return this.length = this._s.push(...string);
}
/** @returns {number} */
count() {
return this.length;
}
/** @returns {string} */
top() {
return this._s[this.length - 1];
}
/** @returns {string} */
pop() {
this.length--;
return this._s.pop();
}
/** empties the store */
clean() {
this._s = [];
this.length = 0;
}
}
})();