@@ -8,32 +8,130 @@ import org.jetbrains.kotlinx.dataframe.columns.ColumnSet
8
8
import org.jetbrains.kotlinx.dataframe.columns.ColumnWithPath
9
9
import org.jetbrains.kotlinx.dataframe.columns.SingleColumn
10
10
11
- public typealias Predicate <T > = (T ) -> Boolean
12
-
13
- public typealias Selector <T , R > = T .(T ) -> R
11
+ /* *
12
+ * [Predicate] is used to reach a [Boolean] result using the given instance of `T` as `it`.
13
+ *
14
+ * Shorthand for:
15
+ * ```kotlin
16
+ * (it: T) -> Boolean
17
+ * ```
18
+ */
19
+ public typealias Predicate <T > = (it: T ) -> Boolean
20
+
21
+ /* *
22
+ * [Selector] is used to express or select any instance of `R` using the given instance of `T` as `this` and `it`.
23
+ *
24
+ * Shorthand for:
25
+ * ```kotlin
26
+ * T.(it: T) -> R
27
+ * ```
28
+ */
29
+ public typealias Selector <T , R > = T .(it: T ) -> R
14
30
15
31
// region selectors
16
32
33
+ /* *
34
+ * [DataFrameExpression] is used to express or select any instance of `R` using the given instance of [DataFrame]`<T>`
35
+ * as `this` and `it`.
36
+ *
37
+ * Shorthand for:
38
+ * ```kotlin
39
+ * DataFrame<T>.(it: DataFrame<T>) -> R
40
+ * ```
41
+ */
17
42
public typealias DataFrameExpression <T , R > = Selector <DataFrame <T >, R >
18
43
44
+ /* *
45
+ * [RowExpression] is used to express or select any instance of `R` using the given instance of [DataRow]`<T>` as
46
+ * `this` and `it`.
47
+ *
48
+ * Shorthand for:
49
+ * ```kotlin
50
+ * DataRow<T>.(it: DataRow<T>) -> R
51
+ * ```
52
+ */
19
53
public typealias RowExpression <T , R > = Selector <DataRow <T >, R >
20
54
21
- public typealias RowValueExpression <T , C , R > = DataRow <T >.(C ) -> R
22
-
23
- public typealias RowColumnExpression <T , C , R > = (DataRow <T >, DataColumn <C >) -> R
24
-
55
+ /* *
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`.
58
+ *
59
+ * Shorthand for:
60
+ * ```kotlin
61
+ * DataRow<T>.(it: C) -> R
62
+ * ```
63
+ */
64
+ public typealias RowValueExpression <T , C , R > = DataRow <T >.(it: C ) -> R
65
+
66
+ /* *
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`.
69
+ *
70
+ * Shorthand for:
71
+ * ```kotlin
72
+ * (row: DataRow<T>, col: DataColumn<C>) -> R
73
+ * ```
74
+ */
75
+ public typealias RowColumnExpression <T , C , R > = (row: DataRow <T >, col: DataColumn <C >) -> R
76
+
77
+ /* *
78
+ * [ColumnSelector] is used to express or select a single column, represented by [SingleColumn]`<C>`, using the
79
+ * context of [ColumnsSelectionDsl]`<T>` as `this` and `it`.
80
+ *
81
+ * Shorthand for:
82
+ * ```kotlin
83
+ * ColumnsSelectionDsl<T>.(it: ColumnsSelectionDsl<T>) -> SingleColumn<C>
84
+ * ```
85
+ */
25
86
public typealias ColumnSelector <T , C > = Selector <ColumnsSelectionDsl <T >, SingleColumn <C >>
26
87
88
+ /* *
89
+ * [ColumnsSelector] is used to express or select multiple columns, represented by [ColumnSet]`<C>`, using the
90
+ * context of [ColumnsSelectionDsl]`<T>` as `this` and `it`.
91
+ *
92
+ * Shorthand for:
93
+ * ```kotlin
94
+ * ColumnsSelectionDsl<T>.(it: ColumnsSelectionDsl<T>) -> ColumnSet<C>
95
+ * ```
96
+ */
27
97
public typealias ColumnsSelector <T , C > = Selector <ColumnsSelectionDsl <T >, ColumnSet <C >>
28
98
29
99
// endregion
30
100
31
101
// region filters
32
102
103
+ /* *
104
+ * [RowFilter] is used to filter or find rows using the given instance of [DataRow]`<T>` as `this` and `it`.
105
+ * Return `true` if the row should be included in the result.
106
+ *
107
+ * Shorthand for:
108
+ * ```kotlin
109
+ * DataRow<T>.(it: DataRow<T>) -> Boolean
110
+ * ```
111
+ */
33
112
public typealias RowFilter <T > = RowExpression <T , Boolean >
34
113
35
- public typealias ColumnFilter <T > = (ColumnWithPath <T >) -> Boolean
36
-
114
+ /* *
115
+ * [ColumnFilter] is used to filter or find columns using the given instance of [ColumnWithPath]`<T>` as `it`.
116
+ * Return `true` if the column should be included in the result.
117
+ *
118
+ * Shorthand for:
119
+ * ```kotlin
120
+ * (it: ColumnWithPath<T>) -> Boolean
121
+ * ```
122
+ */
123
+ public typealias ColumnFilter <T > = Predicate <ColumnWithPath <T >>
124
+
125
+ /* *
126
+ * [RowValueFilter] is used to filter or find rows using the given value of `it: C` and the given instance of
127
+ * [DataRow]`<T>` as `this`.
128
+ * Return `true` if the row should be included in the result.
129
+ *
130
+ * Shorthand for:
131
+ * ```kotlin
132
+ * DataRow<T>.(it: C) -> Boolean
133
+ * ```
134
+ */
37
135
public typealias RowValueFilter <T , C > = RowValueExpression <T , C , Boolean >
38
136
39
137
// endregion
0 commit comments