| 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 Common.CharacterIdMap = class { | 8 Common.CharacterIdMap = class { |
| 9 constructor() { | 9 constructor() { |
| 10 /** @type {!Map<T, string>} */ | 10 /** @type {!Map<T, string>} */ |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 this._characterToElement.set(character, object); | 28 this._characterToElement.set(character, object); |
| 29 } | 29 } |
| 30 return character; | 30 return character; |
| 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); |
| 39 } | 39 } |
| 40 }; | 40 }; |
| OLD | NEW |