/* * @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper * @license BSD-3-Clause (see LICENSE in the root directory of this source tree) */ /** * @private */ export class EnumMap { constructor(){ this._map = {}; } putAll(otherMap){ for(const key in otherMap._map){ this._map[key] = otherMap._map[key]; } return this; } containsKey(key){ // eslint-disable-next-line no-prototype-builtins return (this._map.hasOwnProperty(key.name())) && (this.get(key) !== undefined); } get(key) { return this._map[key.name()]; } put(key, val) { return this.set(key, val); } set(key, val) { this._map[key.name()] = val; return this; } retainAll(keyList){ const map = {}; for(let i=0; i