Line data Source code
1 : // Copyright 2023 The terCAD team. All rights reserved.
2 : // Use of this source code is governed by a CC BY-NC-ND 4.0 license that can be found in the LICENSE file.
3 :
4 : import 'dart:collection';
5 :
6 : import 'package:app_finance/_classes/controller/iterator_controller.dart';
7 :
8 : extension TreeExt<T extends num, K> on SplayTreeMap<T, K> {
9 6 : InterfaceIterator<T, K, M> toStream<M>(bool inverse, {required Function transform, T? boundary, Function? filter}) =>
10 : inverse
11 6 : ? IteratorReverseController<T, K, M>(this, transform: transform, boundary: boundary, filter: filter)
12 0 : : IteratorController<T, K, M>(this, transform: transform, boundary: boundary, filter: filter);
13 : }
|