@@ -6,10 +6,13 @@ import org.jetbrains.kotlinx.dataframe.columns.ColumnAccessor
6
6
import org.jetbrains.kotlinx.dataframe.columns.ColumnReference
7
7
import org.jetbrains.kotlinx.dataframe.columns.ColumnSet
8
8
import org.jetbrains.kotlinx.dataframe.columns.ColumnWithPath
9
+ import org.jetbrains.kotlinx.dataframe.columns.ColumnsResolver
9
10
import org.jetbrains.kotlinx.dataframe.columns.SingleColumn
10
11
11
12
/* *
12
- * [Predicate] is used to reach a [Boolean] result using the given instance of `T` as `it`.
13
+ * ## Predicate
14
+ *
15
+ * [Predicate] is a lambda function expecting a [Boolean] result given an instance of `T` as `it`.
13
16
*
14
17
* Shorthand for:
15
18
* ```kotlin
@@ -19,7 +22,9 @@ import org.jetbrains.kotlinx.dataframe.columns.SingleColumn
19
22
public typealias Predicate <T > = (it: T ) -> Boolean
20
23
21
24
/* *
22
- * [Selector] is used to express or select any instance of `R` using the given instance of `T` as `this` and `it`.
25
+ * ## Selector
26
+ *
27
+ * [Selector] is a lambda function expecting an `R` result given an instance of `T` as context (`this` and `it`).
23
28
*
24
29
* Shorthand for:
25
30
* ```kotlin
@@ -31,8 +36,11 @@ public typealias Selector<T, R> = T.(it: T) -> R
31
36
// region selectors
32
37
33
38
/* *
34
- * [DataFrameExpression] is used to express or select any instance of `R` using the given instance of [DataFrame]`<T>`
35
- * as `this` and `it`.
39
+ * ## DataFrame Expression
40
+ *
41
+ * [DataFrameExpression] is a lambda function expecting an `R` result given an instance of [DataFrame]`<T>` as context
42
+ * (`this` and `it`).
43
+ * `R` can be selected or expressed.
36
44
*
37
45
* Shorthand for:
38
46
* ```kotlin
@@ -42,8 +50,10 @@ public typealias Selector<T, R> = T.(it: T) -> R
42
50
public typealias DataFrameExpression <T , R > = Selector <DataFrame <T >, R >
43
51
44
52
/* *
45
- * [RowExpression] is used to express or select any instance of `R` using the given instance of [DataRow]`<T>` as
46
- * `this` and `it`.
53
+ * ## Row Expression
54
+ *
55
+ * [RowExpression] is a lambda function expecting an `R` result given an instance of [DataRow]`<T>` as context
56
+ * (`this` and `it`). `R` can be selected or expressed.
47
57
*
48
58
* Shorthand for:
49
59
* ```kotlin
@@ -53,8 +63,10 @@ public typealias DataFrameExpression<T, R> = Selector<DataFrame<T>, R>
53
63
public typealias RowExpression <T , R > = Selector <DataRow <T >, R >
54
64
55
65
/* *
56
- * [RowValueExpression] is used to express or select any instance of `R` using the given value `it: C` and the given
57
- * instance of [DataRow]`<T>` as `this`.
66
+ * ## Row Value Expression
67
+ *
68
+ * [RowValueExpression] is a lambda function expecting an `R` result given the value `it: C` and an
69
+ * instance of [DataRow]`<T>` as context (`this`). `R` can be selected or expressed.
58
70
*
59
71
* Shorthand for:
60
72
* ```kotlin
@@ -64,8 +76,10 @@ public typealias RowExpression<T, R> = Selector<DataRow<T>, R>
64
76
public typealias RowValueExpression <T , C , R > = DataRow <T >.(it: C ) -> R
65
77
66
78
/* *
67
- * [RowColumnExpression] is used to express or select any instance of `R` using the given instances of
68
- * [DataRow]`<T>` as `row` and [DataColumn]`<C>` as `col`.
79
+ * ## Row Column Expression
80
+ *
81
+ * [RowColumnExpression] is a lambda function expecting an `R` result given an instance of [DataRow]`<T>` as
82
+ * `row` and [DataColumn]`<C>` as `col`. `R` can be selected or expressed.
69
83
*
70
84
* Shorthand for:
71
85
* ```kotlin
@@ -75,8 +89,10 @@ public typealias RowValueExpression<T, C, R> = DataRow<T>.(it: C) -> R
75
89
public typealias RowColumnExpression <T , C , R > = (row: DataRow <T >, col: DataColumn <C >) -> R
76
90
77
91
/* *
78
- * [ColumnExpression] is used to express or select any instance of `R` using the given instance of [DataColumn]`<C>` as
79
- * `this` and `it`.
92
+ * ## Column Expression
93
+ *
94
+ * [ColumnExpression] is a lambda function expecting an `R` result given an instance of [DataColumn]`<C>` as context
95
+ * (`this` and `it`). `R` can be selected or expressed.
80
96
*
81
97
* Shorthand for:
82
98
* ```kotlin
@@ -86,8 +102,12 @@ public typealias RowColumnExpression<T, C, R> = (row: DataRow<T>, col: DataColum
86
102
public typealias ColumnExpression <C , R > = Selector <DataColumn <C >, R >
87
103
88
104
/* *
89
- * [ColumnSelector] is used to express or select a single column, represented by [SingleColumn]`<C>`, using the
90
- * context of [ColumnsSelectionDsl]`<T>` as `this` and `it`.
105
+ * ## Column Selector
106
+ *
107
+ * [ColumnSelector] is a lambda function expecting a [SingleColumn]<`C`> result given an instance of [ColumnsSelectionDsl]`<T>`
108
+ * as context (`this` and `it`). [SingleColumn]`<C>` can be selected or expressed.
109
+ *
110
+ * See [Columns Selection DSL][ColumnsSelectionDsl] for more information.
91
111
*
92
112
* Shorthand for:
93
113
* ```kotlin
@@ -97,22 +117,31 @@ public typealias ColumnExpression<C, R> = Selector<DataColumn<C>, R>
97
117
public typealias ColumnSelector <T , C > = Selector <ColumnsSelectionDsl <T >, SingleColumn <C >>
98
118
99
119
/* *
100
- * [ColumnsSelector] is used to express or select multiple columns, represented by [ColumnSet]`<C>`, using the
101
- * context of [ColumnsSelectionDsl]`<T>` as `this` and `it`.
120
+ * ## Columns Selector
121
+ *
122
+ * [ColumnsSelector] is a lambda function expecting a [ColumnsResolver]<`C`> ([SingleColumn]<`C`> or [ColumnSet]<`C`>)
123
+ * result given an instance of [ColumnsSelectionDsl]`<T>` as context (`this` and `it`).
124
+ * [ColumnsResolver]<`C`> can be selected or expressed.
125
+ *
126
+ * See [Columns Selection DSL][ColumnsSelectionDsl] for more information.
102
127
*
103
128
* Shorthand for:
104
129
* ```kotlin
105
- * ColumnsSelectionDsl<T>.(it: ColumnsSelectionDsl<T>) -> ColumnSet <C>
130
+ * ColumnsSelectionDsl<T>.(it: ColumnsSelectionDsl<T>) -> ColumnsResolver <C>
106
131
* ```
107
132
*/
108
- public typealias ColumnsSelector <T , C > = Selector <ColumnsSelectionDsl <T >, ColumnSet <C >>
133
+ public typealias ColumnsSelector <T , C > = Selector <ColumnsSelectionDsl <T >, ColumnsResolver <C >>
109
134
110
135
// endregion
111
136
112
137
// region filters
113
138
114
139
/* *
115
- * [RowFilter] is used to filter or find rows using the given instance of [DataRow]`<T>` as `this` and `it`.
140
+ * ## Row Filter
141
+ *
142
+ * [RowFilter] is a lambda function expecting a [Boolean] result given an instance of [DataRow]`<T>` as context
143
+ * (`this` and `it`).
144
+ *
116
145
* Return `true` if the row should be included in the result.
117
146
*
118
147
* Shorthand for:
@@ -123,7 +152,11 @@ public typealias ColumnsSelector<T, C> = Selector<ColumnsSelectionDsl<T>, Column
123
152
public typealias RowFilter <T > = RowExpression <T , Boolean >
124
153
125
154
/* *
126
- * [ColumnFilter] is used to filter or find columns using the given instance of [ColumnWithPath]`<T>` as `it`.
155
+ * ## Column Filter
156
+ *
157
+ * [ColumnFilter] is a lambda function expecting a [Boolean] result given an instance of [DataColumn]`<C>` as context
158
+ * (`this` and `it`).
159
+ *
127
160
* Return `true` if the column should be included in the result.
128
161
*
129
162
* Shorthand for:
@@ -134,8 +167,11 @@ public typealias RowFilter<T> = RowExpression<T, Boolean>
134
167
public typealias ColumnFilter <T > = Predicate <ColumnWithPath <T >>
135
168
136
169
/* *
137
- * [RowValueFilter] is used to filter or find rows using the given value of `it: C` and the given instance of
138
- * [DataRow]`<T>` as `this`.
170
+ * ## Row Value Filter
171
+ *
172
+ * [RowValueFilter] is a lambda function expecting a [Boolean] result given the value `it: C` and an instance
173
+ * of [DataRow]`<T>` as context (`this`).
174
+ *
139
175
* Return `true` if the row should be included in the result.
140
176
*
141
177
* Shorthand for:
0 commit comments