1 | "use strict";
|
2 |
|
3 | Object.defineProperty(exports, "__esModule", {
|
4 | value: true
|
5 | });
|
6 |
|
7 | var _Storage = require("./Storage");
|
8 |
|
9 | var _Storage2 = _interopRequireDefault(_Storage);
|
10 |
|
11 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
12 |
|
13 |
|
14 |
|
15 |
|
16 |
|
17 | class MapStorage extends _Storage2.default {
|
18 | static get $dependencies() {
|
19 | return [];
|
20 | }
|
21 | |
22 |
|
23 |
|
24 |
|
25 |
|
26 | constructor() {
|
27 | super();
|
28 | |
29 |
|
30 |
|
31 |
|
32 |
|
33 |
|
34 |
|
35 | this._storage = new Map();
|
36 | }
|
37 | |
38 |
|
39 |
|
40 |
|
41 |
|
42 | init() {
|
43 | return this;
|
44 | }
|
45 | |
46 |
|
47 |
|
48 |
|
49 |
|
50 | has(key) {
|
51 | return this._storage.has(key);
|
52 | }
|
53 | |
54 |
|
55 |
|
56 |
|
57 |
|
58 | get(key) {
|
59 | return this._storage.get(key);
|
60 | }
|
61 | |
62 |
|
63 |
|
64 |
|
65 |
|
66 | set(key, value) {
|
67 | this._storage.set(key, value);
|
68 |
|
69 | return this;
|
70 | }
|
71 | |
72 |
|
73 |
|
74 |
|
75 |
|
76 | delete(key) {
|
77 | this._storage.delete(key);
|
78 |
|
79 | return this;
|
80 | }
|
81 | |
82 |
|
83 |
|
84 |
|
85 |
|
86 | clear() {
|
87 | this._storage.clear();
|
88 |
|
89 | return this;
|
90 | }
|
91 | |
92 |
|
93 |
|
94 |
|
95 |
|
96 | keys() {
|
97 | return this._storage.keys();
|
98 | }
|
99 | |
100 |
|
101 |
|
102 |
|
103 |
|
104 | size() {
|
105 | return this._storage.size;
|
106 | }
|
107 |
|
108 | }
|
109 |
|
110 | exports.default = MapStorage;
|
111 |
|
112 | typeof $IMA !== 'undefined' && $IMA !== null && $IMA.Loader && $IMA.Loader.register('ima/storage/MapStorage', [], function (_export, _context) {
|
113 | 'use strict';
|
114 | return {
|
115 | setters: [],
|
116 | execute: function () {
|
117 | _export('default', exports.default);
|
118 | }
|
119 | };
|
120 | });
|