OLD | NEW |
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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 library analyzer.src.task.inputs; | 5 library analyzer.src.task.inputs; |
6 | 6 |
7 import 'dart:collection'; | 7 import 'dart:collection'; |
8 | 8 |
9 import 'package:analyzer/task/model.dart'; | 9 import 'package:analyzer/task/model.dart'; |
10 | 10 |
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
275 } | 275 } |
276 } | 276 } |
277 | 277 |
278 /** | 278 /** |
279 * A mixin-ready implementation of [MapTaskInput]. | 279 * A mixin-ready implementation of [MapTaskInput]. |
280 */ | 280 */ |
281 abstract class MapTaskInputMixin<K, V> implements MapTaskInput<K, V> { | 281 abstract class MapTaskInputMixin<K, V> implements MapTaskInput<K, V> { |
282 TaskInput<List/*<E>*/ > toFlattenList/*<E>*/( | 282 TaskInput<List/*<E>*/ > toFlattenList/*<E>*/( |
283 BinaryFunction<K, dynamic /*element of V*/, dynamic/*=E*/ > mapper) { | 283 BinaryFunction<K, dynamic /*element of V*/, dynamic/*=E*/ > mapper) { |
284 return new MapToFlattenListTaskInput<K, dynamic /*element of V*/, | 284 return new MapToFlattenListTaskInput<K, dynamic /*element of V*/, |
285 dynamic/*=E*/ >(this as MapTaskInput<K, List /*element of V*/ >, mapper)
; | 285 dynamic/*=E*/ >( |
| 286 this as MapTaskInput<K, List /*element of V*/ >, mapper); |
286 } | 287 } |
287 } | 288 } |
288 | 289 |
289 /** | 290 /** |
290 * A [TaskInput] that is computed by the following steps. | 291 * A [TaskInput] that is computed by the following steps. |
291 * | 292 * |
292 * First the [base] task input is used to compute a [Map]-valued result. | 293 * First the [base] task input is used to compute a [Map]-valued result. |
293 * The values of the [Map] must be [List]s. | 294 * The values of the [Map] must be [List]s. |
294 * | 295 * |
295 * The given [mapper] is used to transform each key / value pair of the [Map] | 296 * The given [mapper] is used to transform each key / value pair of the [Map] |
(...skipping 697 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
993 return false; | 994 return false; |
994 } | 995 } |
995 _baseListElement = _baseList[_baseListIndex]; | 996 _baseListElement = _baseList[_baseListIndex]; |
996 currentBuilder = input.generateTaskInputs(_baseListElement).createBuilder(); | 997 currentBuilder = input.generateTaskInputs(_baseListElement).createBuilder(); |
997 return currentBuilder.moveNext(); | 998 return currentBuilder.moveNext(); |
998 } | 999 } |
999 | 1000 |
1000 void _addResultElement(B baseElement, E resultElement); | 1001 void _addResultElement(B baseElement, E resultElement); |
1001 void _initResultValue(); | 1002 void _initResultValue(); |
1002 } | 1003 } |
OLD | NEW |