OLD | NEW |
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 part of "internal.dart"; | 5 part of dart._internal; |
6 | 6 |
7 /** | 7 /** |
8 * Marker interface for [Iterable] subclasses that have an efficient | 8 * Marker interface for [Iterable] subclasses that have an efficient |
9 * [length] implementation. | 9 * [length] implementation. |
10 */ | 10 */ |
11 abstract class EfficientLengthIterable<T> extends Iterable<T> { | 11 abstract class EfficientLengthIterable<T> extends Iterable<T> { |
12 const EfficientLengthIterable(); | 12 const EfficientLengthIterable(); |
13 /** | 13 /** |
14 * Returns the number of elements in the iterable. | 14 * Returns the number of elements in the iterable. |
15 * | 15 * |
(...skipping 754 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
770 * Creates errors throw by [Iterable] when the element count is wrong. | 770 * Creates errors throw by [Iterable] when the element count is wrong. |
771 */ | 771 */ |
772 abstract class IterableElementError { | 772 abstract class IterableElementError { |
773 /** Error thrown thrown by, e.g., [Iterable.first] when there is no result. */ | 773 /** Error thrown thrown by, e.g., [Iterable.first] when there is no result. */ |
774 static StateError noElement() => new StateError("No element"); | 774 static StateError noElement() => new StateError("No element"); |
775 /** Error thrown by, e.g., [Iterable.single] if there are too many results. */ | 775 /** Error thrown by, e.g., [Iterable.single] if there are too many results. */ |
776 static StateError tooMany() => new StateError("Too many elements"); | 776 static StateError tooMany() => new StateError("Too many elements"); |
777 /** Error thrown by, e.g., [List.setRange] if there are too few elements. */ | 777 /** Error thrown by, e.g., [List.setRange] if there are too few elements. */ |
778 static StateError tooFew() => new StateError("Too few elements"); | 778 static StateError tooFew() => new StateError("Too few elements"); |
779 } | 779 } |
OLD | NEW |