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

Unified Diff: pkg/analyzer/lib/src/generated/utilities_collection.dart

Issue 1688113004: Remove unused or unneeded stuff from java_core.dart. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 years, 10 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/lib/src/generated/utilities_collection.dart
diff --git a/pkg/analyzer/lib/src/generated/utilities_collection.dart b/pkg/analyzer/lib/src/generated/utilities_collection.dart
index 453ee378c3d8be83aeb5a402e5661425375d753a..043fc44a68672b0d4b19807cc8af52af0914f3cc 100644
--- a/pkg/analyzer/lib/src/generated/utilities_collection.dart
+++ b/pkg/analyzer/lib/src/generated/utilities_collection.dart
@@ -11,6 +11,29 @@ import 'package:analyzer/src/generated/java_core.dart';
import 'package:analyzer/src/generated/scanner.dart' show Token;
/**
+ * Returns `true` if a and b contain equal elements in the same order.
+ */
+bool listsEqual(List a, List b) {
+ // TODO(rnystrom): package:collection also implements this, and analyzer
+ // already transitively depends on that package. Consider using it instead.
+ if (identical(a, b)) {
+ return true;
+ }
+
+ if (a.length != b.length) {
+ return false;
+ }
+
+ for (int i = 0; i < a.length; i++) {
+ if (a[i] != b[i]) {
+ return false;
+ }
+ }
+
+ return true;
+}
+
+/**
* The class `BooleanArray` defines methods for operating on integers as if they were arrays
* of booleans. These arrays can be indexed by either integers or by enumeration constants.
*/

Powered by Google App Engine
This is Rietveld 408576698