1
1
package org.jetbrains.kotlinx.dataframe
2
2
3
3
import org.jetbrains.kotlinx.dataframe.api.ColumnsSelectionDsl
4
- import org.jetbrains.kotlinx.dataframe.api.ColumnsSelectionDslLink
5
4
import org.jetbrains.kotlinx.dataframe.columns.BaseColumn
6
5
import org.jetbrains.kotlinx.dataframe.columns.ColumnAccessor
7
6
import org.jetbrains.kotlinx.dataframe.columns.ColumnReference
7
+ import org.jetbrains.kotlinx.dataframe.columns.ColumnSet
8
8
import org.jetbrains.kotlinx.dataframe.columns.ColumnWithPath
9
9
import org.jetbrains.kotlinx.dataframe.columns.ColumnsResolver
10
10
import org.jetbrains.kotlinx.dataframe.columns.SingleColumn
11
11
12
12
/* *
13
13
* ## Predicate
14
14
*
15
- * [Predicate] is used to reach a [Boolean] result using the given instance of `T` as `it`.
15
+ * [Predicate] is a lambda function expecting a [Boolean] result given an instance of `T` as `it`.
16
16
*
17
17
* Shorthand for:
18
18
* ```kotlin
@@ -24,7 +24,7 @@ public typealias Predicate<T> = (it: T) -> Boolean
24
24
/* *
25
25
* ## Selector
26
26
*
27
- * [Selector] is used to express or select any instance of `R` using the given instance of `T` as `this` and `it`.
27
+ * [Selector] is a lambda function expecting an `R` result given an instance of `T` as context ( `this` and `it`) .
28
28
*
29
29
* Shorthand for:
30
30
* ```kotlin
@@ -38,8 +38,9 @@ public typealias Selector<T, R> = T.(it: T) -> R
38
38
/* *
39
39
* ## DataFrame Expression
40
40
*
41
- * [DataFrameExpression] is used to express or select any instance of `R` using the given instance of [DataFrame]`<T>`
42
- * as `this` and `it`.
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.
43
44
*
44
45
* Shorthand for:
45
46
* ```kotlin
@@ -51,8 +52,8 @@ public typealias DataFrameExpression<T, R> = Selector<DataFrame<T>, R>
51
52
/* *
52
53
* ## Row Expression
53
54
*
54
- * [RowExpression] is used to express or select any instance of `R` using the given instance of [DataRow]`<T>` as
55
- * `this` and `it`.
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 .
56
57
*
57
58
* Shorthand for:
58
59
* ```kotlin
@@ -64,8 +65,8 @@ public typealias RowExpression<T, R> = Selector<DataRow<T>, R>
64
65
/* *
65
66
* ## Row Value Expression
66
67
*
67
- * [RowValueExpression] is used to express or select any instance of `R` using the given value `it: C` and the given
68
- * instance of [DataRow]`<T>` as `this`.
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 .
69
70
*
70
71
* Shorthand for:
71
72
* ```kotlin
@@ -77,8 +78,8 @@ public typealias RowValueExpression<T, C, R> = DataRow<T>.(it: C) -> R
77
78
/* *
78
79
* ## Row Column Expression
79
80
*
80
- * [RowColumnExpression] is used to express or select any instance of `R` using the given instances of
81
- * [DataRow]`<T>` as ` row` and [DataColumn]`<C>` as `col`.
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 .
82
83
*
83
84
* Shorthand for:
84
85
* ```kotlin
@@ -90,8 +91,8 @@ public typealias RowColumnExpression<T, C, R> = (row: DataRow<T>, col: DataColum
90
91
/* *
91
92
* ## Column Expression
92
93
*
93
- * [ColumnExpression] is used to express or select any instance of `R` using the given instance of [DataColumn]`<C>` as
94
- * `this` and `it`.
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 .
95
96
*
96
97
* Shorthand for:
97
98
* ```kotlin
@@ -103,8 +104,10 @@ public typealias ColumnExpression<C, R> = Selector<DataColumn<C>, R>
103
104
/* *
104
105
* ## Column Selector
105
106
*
106
- * A [ColumnSelector] is used to express or select a single column, represented by [SingleColumn]`<C>`, using the
107
- * context of [ColumnsSelectionDsl]`<T>` as `this` and `it`.
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.
108
111
*
109
112
* Shorthand for:
110
113
* ```kotlin
@@ -116,8 +119,9 @@ public typealias ColumnSelector<T, C> = Selector<ColumnsSelectionDsl<T>, SingleC
116
119
/* *
117
120
* ## Columns Selector
118
121
*
119
- * A [ColumnsSelector] is used to express or select one or multiple columns, represented by [ColumnsResolver]`<C>`,
120
- * using the context of [ColumnsSelectionDsl]`<T>` as `this` and `it`.
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.
121
125
*
122
126
* See [Columns Selection DSL][ColumnsSelectionDsl] for more information.
123
127
*
@@ -135,7 +139,9 @@ public typealias ColumnsSelector<T, C> = Selector<ColumnsSelectionDsl<T>, Column
135
139
/* *
136
140
* ## Row Filter
137
141
*
138
- * [RowFilter] is used to filter or find rows using the given instance of [DataRow]`<T>` as `this` and `it`.
142
+ * [RowFilter] is a lambda function expecting a [Boolean] result given an instance of [DataRow]`<T>` as context
143
+ * (`this` and `it`).
144
+ *
139
145
* Return `true` if the row should be included in the result.
140
146
*
141
147
* Shorthand for:
@@ -148,7 +154,9 @@ public typealias RowFilter<T> = RowExpression<T, Boolean>
148
154
/* *
149
155
* ## Column Filter
150
156
*
151
- * [ColumnFilter] is used to filter or find columns using the given instance of [ColumnWithPath]`<T>` as `it`.
157
+ * [ColumnFilter] is a lambda function expecting a [Boolean] result given an instance of [DataColumn]`<C>` as context
158
+ * (`this` and `it`).
159
+ *
152
160
* Return `true` if the column should be included in the result.
153
161
*
154
162
* Shorthand for:
@@ -161,8 +169,9 @@ public typealias ColumnFilter<T> = Predicate<ColumnWithPath<T>>
161
169
/* *
162
170
* ## Row Value Filter
163
171
*
164
- * [RowValueFilter] is used to filter or find rows using the given value of `it: C` and the given instance of
165
- * [DataRow]`<T>` as `this`.
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
+ *
166
175
* Return `true` if the row should be included in the result.
167
176
*
168
177
* Shorthand for:
0 commit comments