OLD | NEW |
---|---|
(Empty) | |
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 | |
3 // BSD-style license that can be found in the LICENSE file. | |
4 | |
5 /// A generator of globally unique identifiers. | |
6 class IdGenerator { | |
7 int _nextFreeId = 0; | |
8 | |
9 /// Returns the next free identifier. | |
10 /// | |
11 /// This identifier is guaranteed to be unique. | |
12 int getNextFreeId() => _nextFreeId++; | |
13 } | |
OLD | NEW |