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

Side by Side Diff: sdk/lib/io/buffer_list.dart

Issue 15263004: Adding isNotEmpty property to collection and string. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix template generation Created 7 years, 6 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 | « sdk/lib/html/html_common/css_class_set.dart ('k') | sdk/lib/io/http_session.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 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 part of dart.io; 5 part of dart.io;
6 6
7 /** 7 /**
8 * Utility class that can fast concatenate [List<int>]s of bytes. Use 8 * Utility class that can fast concatenate [List<int>]s of bytes. Use
9 * [readBytes] to get the final buffer. 9 * [readBytes] to get the final buffer.
10 */ 10 */
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 * Returns the total number of bytes in the buffer. 76 * Returns the total number of bytes in the buffer.
77 */ 77 */
78 int get length => _length; 78 int get length => _length;
79 79
80 /** 80 /**
81 * Returns whether the buffer list is empty. 81 * Returns whether the buffer list is empty.
82 */ 82 */
83 bool get isEmpty => _length == 0; 83 bool get isEmpty => _length == 0;
84 84
85 /** 85 /**
86 * Returns whether the buffer list is not empty.
87 */
88 bool get isNotEmpty => !isEmpty;
89
90 /**
86 * Clears the content of the buffer list. 91 * Clears the content of the buffer list.
87 */ 92 */
88 void clear() { 93 void clear() {
89 _length = 0; 94 _length = 0;
90 _buffer = null; 95 _buffer = null;
91 } 96 }
92 97
93 int _length; // Total number of bytes in the buffer. 98 int _length; // Total number of bytes in the buffer.
94 Uint8List _buffer; // Internal buffer. 99 Uint8List _buffer; // Internal buffer.
95 } 100 }
OLDNEW
« no previous file with comments | « sdk/lib/html/html_common/css_class_set.dart ('k') | sdk/lib/io/http_session.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698