| OLD | NEW |
| 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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 library pub_semver.src.version_union; | |
| 6 | |
| 7 import 'package:collection/collection.dart'; | 5 import 'package:collection/collection.dart'; |
| 8 | 6 |
| 9 import 'utils.dart'; | 7 import 'utils.dart'; |
| 10 import 'version.dart'; | 8 import 'version.dart'; |
| 11 import 'version_constraint.dart'; | 9 import 'version_constraint.dart'; |
| 12 import 'version_range.dart'; | 10 import 'version_range.dart'; |
| 13 | 11 |
| 14 /// A (package-private) version constraint representing a union of multiple | 12 /// A (package-private) version constraint representing a union of multiple |
| 15 /// disjoint version constraints. | 13 /// disjoint version constraints. |
| 16 /// | 14 /// |
| (...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 173 | 171 |
| 174 bool operator ==(other) { | 172 bool operator ==(other) { |
| 175 if (other is! VersionUnion) return false; | 173 if (other is! VersionUnion) return false; |
| 176 return const ListEquality().equals(constraints, other.constraints); | 174 return const ListEquality().equals(constraints, other.constraints); |
| 177 } | 175 } |
| 178 | 176 |
| 179 int get hashCode => const ListEquality().hash(constraints); | 177 int get hashCode => const ListEquality().hash(constraints); |
| 180 | 178 |
| 181 String toString() => constraints.join(" or "); | 179 String toString() => constraints.join(" or "); |
| 182 } | 180 } |
| OLD | NEW |