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

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

Issue 2365553004: Convert subclasses of Enum (Closed)
Patch Set: Created 4 years, 3 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
« no previous file with comments | « pkg/analyzer/lib/src/generated/source.dart ('k') | pkg/analyzer/lib/src/generated/utilities_dart.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 cd395485f05dd8e098fe371c5014784fc903f71d..b1c5e884fb4925114540e47eda56590a7fd57505 100644
--- a/pkg/analyzer/lib/src/generated/utilities_collection.dart
+++ b/pkg/analyzer/lib/src/generated/utilities_collection.dart
@@ -34,17 +34,12 @@ bool listsEqual(List a, List b) {
}
/**
- * 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.
+ * Methods for operating on integers as if they were arrays of booleans. These
+ * arrays can be indexed by either integers or by enumeration constants.
*/
class BooleanArray {
/**
- * Return the value of the element at the given index.
- *
- * @param array the array being accessed
- * @param index the index of the element being accessed
- * @return the value of the element at the given index
- * @throws IndexOutOfBoundsException if the index is not between zero (0) and 31, inclusive
+ * Return the value of the element of the given [array] at the given [index].
*/
static bool get(int array, int index) {
_checkIndex(index);
@@ -53,22 +48,13 @@ class BooleanArray {
/**
* Return the value of the element at the given index.
- *
- * @param array the array being accessed
- * @param index the index of the element being accessed
- * @return the value of the element at the given index
- * @throws IndexOutOfBoundsException if the index is not between zero (0) and 31, inclusive
*/
+ @deprecated
static bool getEnum(int array, Enum index) => get(array, index.ordinal);
/**
- * Set the value of the element at the given index to the given value.
- *
- * @param array the array being modified
- * @param index the index of the element being set
- * @param value the value to be assigned to the element
- * @return the updated value of the array
- * @throws IndexOutOfBoundsException if the index is not between zero (0) and 31, inclusive
+ * Set the value of the element of the given [array] at the given [index] to
+ * the given [value].
*/
static int set(int array, int index, bool value) {
_checkIndex(index);
@@ -81,21 +67,14 @@ class BooleanArray {
/**
* Set the value of the element at the given index to the given value.
- *
- * @param array the array being modified
- * @param index the index of the element being set
- * @param value the value to be assigned to the element
- * @return the updated value of the array
- * @throws IndexOutOfBoundsException if the index is not between zero (0) and 31, inclusive
*/
+ @deprecated
static int setEnum(int array, Enum index, bool value) =>
set(array, index.ordinal, value);
/**
- * Throw an exception if the index is not within the bounds allowed for an integer-encoded array
- * of boolean values.
- *
- * @throws IndexOutOfBoundsException if the index is not between zero (0) and 31, inclusive
+ * Throw an exception if the index is not within the bounds allowed for an
+ * integer-encoded array of boolean values.
*/
static void _checkIndex(int index) {
if (index < 0 || index > 30) {
« no previous file with comments | « pkg/analyzer/lib/src/generated/source.dart ('k') | pkg/analyzer/lib/src/generated/utilities_dart.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698