Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(407)

Unified Diff: pkg/analysis_server/lib/src/collections.dart

Issue 1303033010: Navigation extension point. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: tweaks Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: pkg/analysis_server/lib/src/collections.dart
diff --git a/pkg/analysis_server/lib/src/collections.dart b/pkg/analysis_server/lib/src/collections.dart
index 8ab3da82284b89201485a2db7bd03c04f5a4ea17..1a1ba38e53540225abe11ab5c5807b38e3294213 100644
--- a/pkg/analysis_server/lib/src/collections.dart
+++ b/pkg/analysis_server/lib/src/collections.dart
@@ -28,3 +28,20 @@ List nullIfEmpty(List list) {
}
return list;
}
+
+/// A pair of values.
+class Pair<E, F> {
+ final E first;
+ final F last;
+
+ Pair(this.first, this.last);
+
+ int get hashCode => first.hashCode ^ last.hashCode;
+
+ bool operator ==(other) {
+ if (other is! Pair) return false;
+ return other.first == first && other.last == last;
+ }
+
+ String toString() => '($first, $last)';
+}
« no previous file with comments | « pkg/analysis_server/lib/src/analysis_server.dart ('k') | pkg/analysis_server/lib/src/computer/computer_navigation.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698