| OLD | NEW |
| 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 /// A generator of globally unique identifiers. | 5 /// A generator of globally unique identifiers. |
| 6 class IdGenerator { | 6 class IdGenerator { |
| 7 int _nextFreeId = 0; | 7 int _nextFreeId = 0; |
| 8 | 8 |
| 9 /// Returns the next free identifier. | 9 /// Returns the next free identifier. |
| 10 /// | 10 /// |
| 11 /// This identifier is guaranteed to be unique. | 11 /// This identifier is guaranteed to be unique. |
| 12 int getNextFreeId() => _nextFreeId++; | 12 int getNextFreeId() => _nextFreeId++; |
| 13 } | 13 } |
| OLD | NEW |