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

Side by Side Diff: editor/util/plugins/com.google.dart.java2dart/resources/ast_include.dart

Issue 14173003: Remove Collection, Collections and clean up List/Set/Queue implementations of retain/remove. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 8 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
« no previous file with comments | « no previous file | editor/util/plugins/com.google.dart.java2dart/resources/java_core.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 1
2 /** 2 /**
3 * Instances of the class {@code NodeList} represent a list of AST nodes that ha ve a common parent. 3 * Instances of the class {@code NodeList} represent a list of AST nodes that ha ve a common parent.
4 */ 4 */
5 class NodeList<E extends ASTNode> extends ListWrapper<E> { 5 class NodeList<E extends ASTNode> extends ListWrapper<E> {
6 /** 6 /**
7 * The node that is the parent of each of the elements in the list. 7 * The node that is the parent of each of the elements in the list.
8 */ 8 */
9 ASTNode owner; 9 ASTNode owner;
10 /** 10 /**
(...skipping 11 matching lines...) Expand all
22 */ 22 */
23 accept(ASTVisitor visitor) { 23 accept(ASTVisitor visitor) {
24 for (E element in elements) { 24 for (E element in elements) {
25 element.accept(visitor); 25 element.accept(visitor);
26 } 26 }
27 } 27 }
28 void add(E node) { 28 void add(E node) {
29 owner.becomeParentOf(node); 29 owner.becomeParentOf(node);
30 elements.add(node); 30 elements.add(node);
31 } 31 }
32 bool addAll(Collection<E> nodes) { 32 bool addAll(Iterable<E> nodes) {
33 if (nodes != null) { 33 if (nodes != null) {
34 for (E node in nodes) { 34 for (E node in nodes) {
35 add(node); 35 add(node);
36 } 36 }
37 return true; 37 return true;
38 } 38 }
39 return false; 39 return false;
40 } 40 }
41 /** 41 /**
42 * Return the first token included in this node's source range. 42 * Return the first token included in this node's source range.
(...skipping 15 matching lines...) Expand all
58 } 58 }
59 return elements[elements.length - 1].endToken; 59 return elements[elements.length - 1].endToken;
60 } 60 }
61 /** 61 /**
62 * Return the node that is the parent of each of the elements in the list. 62 * Return the node that is the parent of each of the elements in the list.
63 * @return the node that is the parent of each of the elements in the list 63 * @return the node that is the parent of each of the elements in the list
64 */ 64 */
65 ASTNode getOwner() { 65 ASTNode getOwner() {
66 return owner; 66 return owner;
67 } 67 }
68 } 68 }
OLDNEW
« no previous file with comments | « no previous file | editor/util/plugins/com.google.dart.java2dart/resources/java_core.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698