| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 /** | 4 /** |
| 5 * @template T | 5 * @template T |
| 6 * @unrestricted | 6 * @unrestricted |
| 7 */ | 7 */ |
| 8 WebInspector.CharacterIdMap = class { | 8 Common.CharacterIdMap = class { |
| 9 constructor() { | 9 constructor() { |
| 10 /** @type {!Map<T, string>} */ | 10 /** @type {!Map<T, string>} */ |
| 11 this._elementToCharacter = new Map(); | 11 this._elementToCharacter = new Map(); |
| 12 /** @type {!Map<string, T>} */ | 12 /** @type {!Map<string, T>} */ |
| 13 this._characterToElement = new Map(); | 13 this._characterToElement = new Map(); |
| 14 this._charCode = 33; | 14 this._charCode = 33; |
| 15 } | 15 } |
| 16 | 16 |
| 17 /** | 17 /** |
| 18 * @param {T} object | 18 * @param {T} object |
| (...skipping 12 matching lines...) Expand all Loading... |
| 31 } | 31 } |
| 32 | 32 |
| 33 /** | 33 /** |
| 34 * @param {string} character | 34 * @param {string} character |
| 35 * @return {?T} | 35 * @return {?T} |
| 36 */ | 36 */ |
| 37 fromChar(character) { | 37 fromChar(character) { |
| 38 return this._characterToElement.get(character) || null; | 38 return this._characterToElement.get(character) || null; |
| 39 } | 39 } |
| 40 }; | 40 }; |
| OLD | NEW |