@@ -7,14 +7,14 @@ package org.jetbrains.kotlinx.dataframe.impl.aggregation.aggregators
7
7
* @see AggregatorOptionSwitch2
8
8
*/
9
9
@PublishedApi
10
- internal class AggregatorOptionSwitch1 <in Param1 , out AggregatorType : Aggregator < * , * > >(
10
+ internal class AggregatorOptionSwitch1 <in Param1 , in Value : Any , out Return : Any ? >(
11
11
val name : String ,
12
- val getAggregator : (param1: Param1 ) -> AggregatorProvider <AggregatorType >,
12
+ val getAggregator : (param1: Param1 ) -> AggregatorProvider <Value , Return >,
13
13
) {
14
14
15
- private val cache: MutableMap <Param1 , AggregatorType > = mutableMapOf ()
15
+ private val cache: MutableMap <Param1 , Aggregator < Value , Return > > = mutableMapOf ()
16
16
17
- operator fun invoke (param1 : Param1 ): AggregatorType =
17
+ operator fun invoke (param1 : Param1 ): Aggregator < Value , Return > =
18
18
cache.getOrPut(param1) {
19
19
getAggregator(param1).create(name)
20
20
}
@@ -31,8 +31,8 @@ internal class AggregatorOptionSwitch1<in Param1, out AggregatorType : Aggregato
31
31
* MyAggregator.Factory(param1)
32
32
* }
33
33
*/
34
- fun <Param1 , AggregatorType : Aggregator < * , * > > Factory (
35
- getAggregator : (param1: Param1 ) -> AggregatorProvider <AggregatorType >,
34
+ fun <Param1 , Value : Any , Return : Any ? > Factory (
35
+ getAggregator : (param1: Param1 ) -> AggregatorProvider <Value , Return >,
36
36
) = Provider { name -> AggregatorOptionSwitch1 (name, getAggregator) }
37
37
}
38
38
}
@@ -44,14 +44,14 @@ internal class AggregatorOptionSwitch1<in Param1, out AggregatorType : Aggregato
44
44
* @see AggregatorOptionSwitch1
45
45
*/
46
46
@PublishedApi
47
- internal class AggregatorOptionSwitch2 <in Param1 , in Param2 , out AggregatorType : Aggregator < * , * > >(
47
+ internal class AggregatorOptionSwitch2 <in Param1 , in Param2 , in Value : Any , out Return : Any ? >(
48
48
val name : String ,
49
- val getAggregator : (param1: Param1 , param2: Param2 ) -> AggregatorProvider <AggregatorType >,
49
+ val getAggregator : (param1: Param1 , param2: Param2 ) -> AggregatorProvider <Value , Return >,
50
50
) {
51
51
52
- private val cache: MutableMap <Pair <Param1 , Param2 >, AggregatorType > = mutableMapOf ()
52
+ private val cache: MutableMap <Pair <Param1 , Param2 >, Aggregator < Value , Return > > = mutableMapOf ()
53
53
54
- operator fun invoke (param1 : Param1 , param2 : Param2 ): AggregatorType =
54
+ operator fun invoke (param1 : Param1 , param2 : Param2 ): Aggregator < Value , Return > =
55
55
cache.getOrPut(param1 to param2) {
56
56
getAggregator(param1, param2).create(name)
57
57
}
@@ -68,8 +68,8 @@ internal class AggregatorOptionSwitch2<in Param1, in Param2, out AggregatorType
68
68
* MyAggregator.Factory(param1, param2)
69
69
* }
70
70
*/
71
- fun <Param1 , Param2 , AggregatorType : Aggregator < * , * > > Factory (
72
- getAggregator : (param1: Param1 , param2: Param2 ) -> AggregatorProvider <AggregatorType >,
71
+ fun <Param1 , Param2 , Value : Any , Return : Any ? > Factory (
72
+ getAggregator : (param1: Param1 , param2: Param2 ) -> AggregatorProvider <Value , Return >,
73
73
) = Provider { name -> AggregatorOptionSwitch2 (name, getAggregator) }
74
74
}
75
75
}
0 commit comments