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

Side by Side Diff: sdk/lib/collection/linked_hash_set.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/collection/linked_hash_map.dart ('k') | sdk/lib/collection/list.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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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.collection; 5 part of dart.collection;
6 6
7 class LinkedHashSet<E> extends _HashSetBase<E> { 7 class LinkedHashSet<E> extends _HashSetBase<E> {
8 8
9 external LinkedHashSet(); 9 external LinkedHashSet();
10 10
11 factory LinkedHashSet.from(Iterable<E> iterable) { 11 factory LinkedHashSet.from(Iterable<E> iterable) {
12 return new LinkedHashSet<E>()..addAll(iterable); 12 return new LinkedHashSet<E>()..addAll(iterable);
13 } 13 }
14 14
15 // Iterable. 15 // Iterable.
16 external Iterator<E> get iterator; 16 external Iterator<E> get iterator;
17 17
18 external int get length; 18 external int get length;
19 19
20 external bool get isEmpty; 20 external bool get isEmpty;
21 21
22 external bool get isNotEmpty;
23
22 external bool contains(Object object); 24 external bool contains(Object object);
23 25
24 external void forEach(void action(E element)); 26 external void forEach(void action(E element));
25 27
26 external E get first; 28 external E get first;
27 29
28 external E get last; 30 external E get last;
29 31
30 E get single { 32 E get single {
31 if (length == 1) return first; 33 if (length == 1) return first;
(...skipping 12 matching lines...) Expand all
44 46
45 external void removeWhere(bool test(E element)); 47 external void removeWhere(bool test(E element));
46 48
47 external void retainWhere(bool test(E element)); 49 external void retainWhere(bool test(E element));
48 50
49 external void clear(); 51 external void clear();
50 52
51 // Set. 53 // Set.
52 Set<E> _newSet() => new LinkedHashSet<E>(); 54 Set<E> _newSet() => new LinkedHashSet<E>();
53 } 55 }
OLDNEW
« no previous file with comments | « sdk/lib/collection/linked_hash_map.dart ('k') | sdk/lib/collection/list.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698