File tree Expand file tree Collapse file tree 2 files changed +11
-2
lines changed
pkg/analyzer/lib/src/fine Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ import 'package:collection/collection.dart';
13
13
/// We give a new identifier each time when just anything changes about
14
14
/// an element. Even if an element changes as `A` to `B` to `A` , it will get
15
15
/// `id1` , `id2` , `id3` . Never `id1` again.
16
- class ManifestItemId {
16
+ class ManifestItemId implements Comparable < ManifestItemId > {
17
17
static final _randomGenerator = Random ();
18
18
19
19
final int timestamp;
@@ -42,6 +42,15 @@ class ManifestItemId {
42
42
other.randomBits == randomBits;
43
43
}
44
44
45
+ @override
46
+ int compareTo (ManifestItemId other) {
47
+ var result = timestamp.compareTo (other.timestamp);
48
+ if (result != 0 ) {
49
+ return result;
50
+ }
51
+ return randomBits.compareTo (other.randomBits);
52
+ }
53
+
45
54
@override
46
55
String toString () {
47
56
return '($timestamp , $randomBits )' ;
Original file line number Diff line number Diff line change @@ -27,5 +27,5 @@ CHANNEL dev
27
27
MAJOR 3
28
28
MINOR 10
29
29
PATCH 0
30
- PRERELEASE 82
30
+ PRERELEASE 83
31
31
PRERELEASE_PATCH 0
You can’t perform that action at this time.
0 commit comments