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

Side by Side Diff: pkg/analyzer_experimental/lib/src/generated/utilities_collection.dart

Issue 23852002: java2dart improvements and new analyzer_experimental snapshot. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // This code was auto-generated, is not intended to be edited, and is subject to 1 // This code was auto-generated, is not intended to be edited, and is subject to
2 // significant change. Please see the README file for more information. 2 // significant change. Please see the README file for more information.
3 library engine.utilities.collection; 3 library engine.utilities.collection;
4 import 'java_core.dart'; 4 import 'java_core.dart';
5 /** 5 /**
6 * The class `BooleanArray` defines methods for operating on integers as if they were arrays 6 * The class `BooleanArray` defines methods for operating on integers as if they were arrays
7 * of booleans. These arrays can be indexed by either integers or by enumeration constants. 7 * of booleans. These arrays can be indexed by either integers or by enumeration constants.
8 */ 8 */
9 class BooleanArray { 9 class BooleanArray {
10 10
11 /** 11 /**
12 * Return the value of the element at the given index. 12 * Return the value of the element at the given index.
13 * 13 *
14 * @param array the array being accessed 14 * @param array the array being accessed
15 * @param index the index of the element being accessed 15 * @param index the index of the element being accessed
16 * @return the value of the element at the given index 16 * @return the value of the element at the given index
17 * @throws IndexOutOfBoundsException if the index is not between zero (0) and 31, inclusive 17 * @throws IndexOutOfBoundsException if the index is not between zero (0) and 31, inclusive
18 */ 18 */
19 static bool get(int array, Enum<Object> index) => get2(array, index.ordinal); 19 static bool get(int array, Enum index) => get2(array, index.ordinal);
20 20
21 /** 21 /**
22 * Return the value of the element at the given index. 22 * Return the value of the element at the given index.
23 * 23 *
24 * @param array the array being accessed 24 * @param array the array being accessed
25 * @param index the index of the element being accessed 25 * @param index the index of the element being accessed
26 * @return the value of the element at the given index 26 * @return the value of the element at the given index
27 * @throws IndexOutOfBoundsException if the index is not between zero (0) and 31, inclusive 27 * @throws IndexOutOfBoundsException if the index is not between zero (0) and 31, inclusive
28 */ 28 */
29 static bool get2(int array, int index) { 29 static bool get2(int array, int index) {
30 checkIndex(index); 30 checkIndex(index);
31 return (array & (1 << index)) > 0; 31 return (array & (1 << index)) > 0;
32 } 32 }
33 33
34 /** 34 /**
35 * Set the value of the element at the given index to the given value. 35 * Set the value of the element at the given index to the given value.
36 * 36 *
37 * @param array the array being modified 37 * @param array the array being modified
38 * @param index the index of the element being set 38 * @param index the index of the element being set
39 * @param value the value to be assigned to the element 39 * @param value the value to be assigned to the element
40 * @return the updated value of the array 40 * @return the updated value of the array
41 * @throws IndexOutOfBoundsException if the index is not between zero (0) and 31, inclusive 41 * @throws IndexOutOfBoundsException if the index is not between zero (0) and 31, inclusive
42 */ 42 */
43 static int set(int array, Enum<Object> index, bool value) => set2(array, index .ordinal, value); 43 static int set(int array, Enum index, bool value) => set2(array, index.ordinal , value);
44 44
45 /** 45 /**
46 * Set the value of the element at the given index to the given value. 46 * Set the value of the element at the given index to the given value.
47 * 47 *
48 * @param array the array being modified 48 * @param array the array being modified
49 * @param index the index of the element being set 49 * @param index the index of the element being set
50 * @param value the value to be assigned to the element 50 * @param value the value to be assigned to the element
51 * @return the updated value of the array 51 * @return the updated value of the array
52 * @throws IndexOutOfBoundsException if the index is not between zero (0) and 31, inclusive 52 * @throws IndexOutOfBoundsException if the index is not between zero (0) and 31, inclusive
53 */ 53 */
(...skipping 29 matching lines...) Expand all
83 * 83 *
84 * @param list the list to which the elements are to be added 84 * @param list the list to which the elements are to be added
85 * @param elements the elements to be added to the list 85 * @param elements the elements to be added to the list
86 */ 86 */
87 static void addAll(List list, List<Object> elements) { 87 static void addAll(List list, List<Object> elements) {
88 for (Object element in elements) { 88 for (Object element in elements) {
89 list.add(element); 89 list.add(element);
90 } 90 }
91 } 91 }
92 } 92 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698