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

Unified Diff: pkg/analyzer_plugin/lib/utilities/pair.dart

Issue 2902193002: Add navigation support in plugins (Closed)
Patch Set: Created 3 years, 7 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/analyzer_plugin/lib/utilities/pair.dart
diff --git a/pkg/analyzer_plugin/lib/utilities/pair.dart b/pkg/analyzer_plugin/lib/utilities/pair.dart
new file mode 100644
index 0000000000000000000000000000000000000000..4886db77674a64d254d277ed37a8e7adb9896221
--- /dev/null
+++ b/pkg/analyzer_plugin/lib/utilities/pair.dart
@@ -0,0 +1,27 @@
+// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+/**
+ * A pair of values.
+ */
+class Pair<E, F> {
+ final E first;
+ final F last;
+
+ Pair(this.first, this.last);
+
+ @override
+ int get hashCode => first.hashCode ^ last.hashCode;
+
+ @override
+ bool operator ==(other) {
+ if (other is! Pair) {
+ return false;
+ }
+ return other.first == first && other.last == last;
+ }
+
+ @override
+ String toString() => '($first, $last)';
+}
« no previous file with comments | « pkg/analyzer_plugin/lib/utilities/navigation.dart ('k') | pkg/analyzer_plugin/test/src/utilities/navigation_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698