Skip to content

Commit f228165

Browse files
committed
improving kdocs for typealiases for lambdas, linting
1 parent be1e9e9 commit f228165

File tree

5 files changed

+36
-25
lines changed

5 files changed

+36
-25
lines changed

core/generated-sources/src/main/kotlin/org/jetbrains/kotlinx/dataframe/api/allExcept.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ import org.jetbrains.kotlinx.dataframe.columns.ColumnWithPath
1111
import org.jetbrains.kotlinx.dataframe.columns.ColumnsResolver
1212
import org.jetbrains.kotlinx.dataframe.columns.SingleColumn
1313
import org.jetbrains.kotlinx.dataframe.columns.toColumnSet
14-
import org.jetbrains.kotlinx.dataframe.documentation.AccessApiLink
1514
import org.jetbrains.kotlinx.dataframe.documentation.AccessApi.ExtensionPropertiesApiLink
15+
import org.jetbrains.kotlinx.dataframe.documentation.AccessApiLink
1616
import org.jetbrains.kotlinx.dataframe.documentation.Indent
1717
import org.jetbrains.kotlinx.dataframe.documentation.LineBreak
1818
import org.jetbrains.kotlinx.dataframe.documentation.UsageTemplateColumnsSelectionDsl.UsageTemplate

core/generated-sources/src/main/kotlin/org/jetbrains/kotlinx/dataframe/api/none.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
package org.jetbrains.kotlinx.dataframe.api
22

33
import org.jetbrains.kotlinx.dataframe.DataFrame
4-
import org.jetbrains.kotlinx.dataframe.columns.ColumnsResolver
4+
import org.jetbrains.kotlinx.dataframe.api.NoneColumnsSelectionDsl.Usage.PlainDslName
55
import org.jetbrains.kotlinx.dataframe.columns.ColumnSet
6+
import org.jetbrains.kotlinx.dataframe.columns.ColumnsResolver
67
import org.jetbrains.kotlinx.dataframe.documentation.UsageTemplateColumnsSelectionDsl.UsageTemplate
78
import org.jetbrains.kotlinx.dataframe.impl.columns.ColumnsList
89

core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/aliases.kt

Lines changed: 30 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
package org.jetbrains.kotlinx.dataframe
22

33
import org.jetbrains.kotlinx.dataframe.api.ColumnsSelectionDsl
4-
import org.jetbrains.kotlinx.dataframe.api.ColumnsSelectionDslLink
54
import org.jetbrains.kotlinx.dataframe.columns.BaseColumn
65
import org.jetbrains.kotlinx.dataframe.columns.ColumnAccessor
76
import org.jetbrains.kotlinx.dataframe.columns.ColumnReference
7+
import org.jetbrains.kotlinx.dataframe.columns.ColumnSet
88
import org.jetbrains.kotlinx.dataframe.columns.ColumnWithPath
99
import org.jetbrains.kotlinx.dataframe.columns.ColumnsResolver
1010
import org.jetbrains.kotlinx.dataframe.columns.SingleColumn
1111

1212
/**
1313
* ## Predicate
1414
*
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`.
1616
*
1717
* Shorthand for:
1818
* ```kotlin
@@ -24,7 +24,7 @@ public typealias Predicate<T> = (it: T) -> Boolean
2424
/**
2525
* ## Selector
2626
*
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`).
2828
*
2929
* Shorthand for:
3030
* ```kotlin
@@ -38,8 +38,9 @@ public typealias Selector<T, R> = T.(it: T) -> R
3838
/**
3939
* ## DataFrame Expression
4040
*
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.
4344
*
4445
* Shorthand for:
4546
* ```kotlin
@@ -51,8 +52,8 @@ public typealias DataFrameExpression<T, R> = Selector<DataFrame<T>, R>
5152
/**
5253
* ## Row Expression
5354
*
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.
5657
*
5758
* Shorthand for:
5859
* ```kotlin
@@ -64,8 +65,8 @@ public typealias RowExpression<T, R> = Selector<DataRow<T>, R>
6465
/**
6566
* ## Row Value Expression
6667
*
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.
6970
*
7071
* Shorthand for:
7172
* ```kotlin
@@ -77,8 +78,8 @@ public typealias RowValueExpression<T, C, R> = DataRow<T>.(it: C) -> R
7778
/**
7879
* ## Row Column Expression
7980
*
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.
8283
*
8384
* Shorthand for:
8485
* ```kotlin
@@ -90,8 +91,8 @@ public typealias RowColumnExpression<T, C, R> = (row: DataRow<T>, col: DataColum
9091
/**
9192
* ## Column Expression
9293
*
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.
9596
*
9697
* Shorthand for:
9798
* ```kotlin
@@ -103,8 +104,10 @@ public typealias ColumnExpression<C, R> = Selector<DataColumn<C>, R>
103104
/**
104105
* ## Column Selector
105106
*
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.
108111
*
109112
* Shorthand for:
110113
* ```kotlin
@@ -116,8 +119,9 @@ public typealias ColumnSelector<T, C> = Selector<ColumnsSelectionDsl<T>, SingleC
116119
/**
117120
* ## Columns Selector
118121
*
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.
121125
*
122126
* See [Columns Selection DSL][ColumnsSelectionDsl] for more information.
123127
*
@@ -135,7 +139,9 @@ public typealias ColumnsSelector<T, C> = Selector<ColumnsSelectionDsl<T>, Column
135139
/**
136140
* ## Row Filter
137141
*
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+
*
139145
* Return `true` if the row should be included in the result.
140146
*
141147
* Shorthand for:
@@ -148,7 +154,9 @@ public typealias RowFilter<T> = RowExpression<T, Boolean>
148154
/**
149155
* ## Column Filter
150156
*
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+
*
152160
* Return `true` if the column should be included in the result.
153161
*
154162
* Shorthand for:
@@ -161,8 +169,9 @@ public typealias ColumnFilter<T> = Predicate<ColumnWithPath<T>>
161169
/**
162170
* ## Row Value Filter
163171
*
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+
*
166175
* Return `true` if the row should be included in the result.
167176
*
168177
* Shorthand for:

core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/api/allExcept.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ import org.jetbrains.kotlinx.dataframe.columns.ColumnWithPath
1111
import org.jetbrains.kotlinx.dataframe.columns.ColumnsResolver
1212
import org.jetbrains.kotlinx.dataframe.columns.SingleColumn
1313
import org.jetbrains.kotlinx.dataframe.columns.toColumnSet
14-
import org.jetbrains.kotlinx.dataframe.documentation.AccessApiLink
1514
import org.jetbrains.kotlinx.dataframe.documentation.AccessApi.ExtensionPropertiesApiLink
15+
import org.jetbrains.kotlinx.dataframe.documentation.AccessApiLink
1616
import org.jetbrains.kotlinx.dataframe.documentation.Indent
1717
import org.jetbrains.kotlinx.dataframe.documentation.LineBreak
1818
import org.jetbrains.kotlinx.dataframe.documentation.UsageTemplateColumnsSelectionDsl.UsageTemplate

core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/api/none.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
package org.jetbrains.kotlinx.dataframe.api
22

33
import org.jetbrains.kotlinx.dataframe.DataFrame
4-
import org.jetbrains.kotlinx.dataframe.columns.ColumnsResolver
4+
import org.jetbrains.kotlinx.dataframe.api.NoneColumnsSelectionDsl.Usage.PlainDslName
55
import org.jetbrains.kotlinx.dataframe.columns.ColumnSet
6+
import org.jetbrains.kotlinx.dataframe.columns.ColumnsResolver
67
import org.jetbrains.kotlinx.dataframe.documentation.UsageTemplateColumnsSelectionDsl.UsageTemplate
78
import org.jetbrains.kotlinx.dataframe.impl.columns.ColumnsList
89

0 commit comments

Comments
 (0)