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

Side by Side Diff: compiler/lib/implementation/string_buffer.dart

Issue 8913006: Expands on previous function RTT to support named/optional parameters. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Nits Created 9 years 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 | « compiler/lib/implementation/rtt.js ('k') | tests/co19/co19-compiler.status » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 /** 5 /**
6 * The StringBuffer class is useful for concatenating strings 6 * The StringBuffer class is useful for concatenating strings
7 * efficiently. Only on a call to [toString] are the strings 7 * efficiently. Only on a call to [toString] are the strings
8 * concatenated to a single String. 8 * concatenated to a single String.
9 */ 9 */
10 class StringBufferImpl implements StringBuffer { 10 class StringBufferImpl implements StringBuffer {
(...skipping 24 matching lines...) Expand all
35 if (str === null || str.isEmpty()) return this; 35 if (str === null || str.isEmpty()) return this;
36 _buffer.add(str); 36 _buffer.add(str);
37 _length += str.length; 37 _length += str.length;
38 return this; 38 return this;
39 } 39 }
40 40
41 /** 41 /**
42 * Adds all items in [objects] to the buffer. Returns [this]. 42 * Adds all items in [objects] to the buffer. Returns [this].
43 */ 43 */
44 StringBuffer addAll(Collection<Object> objects) { 44 StringBuffer addAll(Collection<Object> objects) {
45 if (objects == null) {
46 throw const NullPointerException();
47 }
45 for (Object obj in objects) { 48 for (Object obj in objects) {
46 add(obj); 49 add(obj);
47 } 50 }
48 return this; 51 return this;
49 } 52 }
50 53
51 /** 54 /**
52 * Adds the string representation of [charCode] to the buffer. 55 * Adds the string representation of [charCode] to the buffer.
53 * Returns [this]. 56 * Returns [this].
54 */ 57 */
(...skipping 20 matching lines...) Expand all
75 _buffer.clear(); 78 _buffer.clear();
76 _buffer.add(result); 79 _buffer.add(result);
77 // Since we track the length at each add operation, there is no 80 // Since we track the length at each add operation, there is no
78 // need to update it in this function. 81 // need to update it in this function.
79 return result; 82 return result;
80 } 83 }
81 84
82 List<String> _buffer; 85 List<String> _buffer;
83 int _length; 86 int _length;
84 } 87 }
OLDNEW
« no previous file with comments | « compiler/lib/implementation/rtt.js ('k') | tests/co19/co19-compiler.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698