Skip to content

Commit b60905c

Browse files
committed
Replaced all bodiless documentation interfaces with "free" Nothing-type-aliases in :core, saving 400KB of jar size
1 parent 8f9f2a2 commit b60905c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

75 files changed

+629
-645
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import org.jetbrains.kotlinx.dataframe.util.DEPRECATED_ACCESS_API
1616
import kotlin.reflect.KProperty
1717

1818
/** [Column Selection DSL][ColumnSelectionDsl] */
19-
internal interface ColumnSelectionDslLink
19+
internal typealias ColumnSelectionDslLink = Nothing
2020

2121
public interface ColumnSelectionDsl<out T> : ColumnsContainer<T> {
2222

@@ -27,7 +27,7 @@ public interface ColumnSelectionDsl<out T> : ColumnsContainer<T> {
2727
* This is a shorthand for [get][ColumnsContainer.get]`(myColumn)`.
2828
* @throws [IllegalArgumentException] if the column is not found.
2929
*/
30-
private interface CommonColumnReferenceInvokeDocs
30+
private typealias CommonColumnReferenceInvokeDocs = Nothing
3131

3232
/**
3333
* @include [CommonColumnReferenceInvokeDocs]
@@ -67,7 +67,7 @@ public interface ColumnSelectionDsl<out T> : ColumnsContainer<T> {
6767
* This is a shorthand for [get][ColumnsContainer.get]`(MyType::myColumn)`.
6868
* @throws [IllegalArgumentException] if the column is not found.
6969
*/
70-
private interface CommonKPropertyInvokeDocs
70+
private typealias CommonKPropertyInvokeDocs = Nothing
7171

7272
/**
7373
* @include [CommonKPropertyInvokeDocs]
@@ -106,7 +106,7 @@ public interface ColumnSelectionDsl<out T> : ColumnsContainer<T> {
106106
*
107107
* @throws [IllegalArgumentException] if the column is not found.
108108
*/
109-
private interface CommonKPropertyGetDocs
109+
private typealias CommonKPropertyGetDocs = Nothing
110110

111111
/**
112112
* @include [CommonKPropertyGetDocs]

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import org.jetbrains.kotlinx.dataframe.util.DEPRECATED_ACCESS_API
2020
import kotlin.reflect.KProperty
2121

2222
/** [Columns Selection DSL][ColumnsSelectionDsl] */
23-
internal interface ColumnsSelectionDslLink
23+
internal typealias ColumnsSelectionDslLink = Nothing
2424

2525
@Suppress("UNCHECKED_CAST")
2626
@PublishedApi
@@ -167,7 +167,7 @@ public interface ColumnsSelectionDsl<out T> : // SingleColumn<DataRow<T>>
167167
* {@include [DslGrammarTemplate.TextDef]}
168168
*/
169169
@[ExcludeFromSources ExportAsHtml]
170-
public interface DefinitionsPartOfGrammar
170+
public typealias DefinitionsPartOfGrammar = Nothing
171171

172172
/**
173173
* {@include [DslGrammarTemplate.ColumnRef]}` `{@include [ColumnRangeColumnsSelectionDsl.Grammar.PlainDslName]}` `{@include [DslGrammarTemplate.ColumnRef]}
@@ -229,7 +229,7 @@ public interface ColumnsSelectionDsl<out T> : // SingleColumn<DataRow<T>>
229229
* `| `{@include [WithoutNullsColumnsSelectionDsl.Grammar.PlainDslName]}**`()`**
230230
*/
231231
@[ExcludeFromSources ExportAsHtml]
232-
public interface PlainDslPartOfGrammar
232+
public typealias PlainDslPartOfGrammar = Nothing
233233

234234
/**
235235
* {@include [Indent]}\[**`\[`**\][ColumnsSelectionDsl.col]{@include [DslGrammarTemplate.IndexRef]}\[**`\]`**\][ColumnsSelectionDsl.col]
@@ -297,7 +297,7 @@ public interface ColumnsSelectionDsl<out T> : // SingleColumn<DataRow<T>>
297297
* {@include [ColumnSetPartOfGrammar]}
298298
*/
299299
@ExportAsHtml
300-
public interface ForHtml
300+
public typealias ForHtml = Nothing
301301
}
302302

303303
/**
@@ -374,7 +374,7 @@ public interface ColumnsSelectionDsl<out T> : // SingleColumn<DataRow<T>>
374374
* {@include [ColumnGroupPartOfGrammar]}
375375
*/
376376
@ExportAsHtml
377-
public interface ForHtml
377+
public typealias ForHtml = Nothing
378378
}
379379
}
380380

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,14 +114,14 @@ public operator fun AnyRow.contains(column: KProperty<*>): Boolean = containsKey
114114
*
115115
* @return [firstRowValue] for the first row; difference between expression computed for current and previous row for the following rows
116116
*/
117-
internal interface DiffDocs
117+
internal typealias DiffDocs = Nothing
118118

119119
/**
120120
* Calculates the difference between the results of a row expression computed on the current and previous DataRow.
121121
*
122122
* @return null for the first row; difference between expression computed for current and previous row for the following rows
123123
*/
124-
internal interface DiffOrNullDocs
124+
internal typealias DiffOrNullDocs = Nothing
125125

126126
/**
127127
* @include [DiffDocs]

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

Lines changed: 28 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -42,17 +42,17 @@ import kotlin.reflect.KProperty
4242
internal interface FillNulls {
4343

4444
/** @include [Update.Grammar] {@set [UPDATE_OPERATION] [**fillNulls**][fillNulls]} */
45-
interface Grammar
45+
typealias Grammar = Nothing
4646

4747
/**
4848
* {@comment Version of [SelectingColumns] with correctly filled in examples}
4949
* @include [SelectingColumns] {@include [SetFillNullsOperationArg]}
5050
*/
51-
interface FillNullsSelectingOptions
51+
typealias FillNullsSelectingOptions = Nothing
5252
}
5353

5454
/** {@set [SelectingColumns.OPERATION] [fillNulls][fillNulls]} */
55-
private interface SetFillNullsOperationArg
55+
private typealias SetFillNullsOperationArg = Nothing
5656

5757
/**
5858
* @include [FillNulls] {@comment Description of the fillNulls operation.}
@@ -63,7 +63,7 @@ private interface SetFillNullsOperationArg
6363
*
6464
*/
6565
@ExcludeFromSources
66-
private interface CommonFillNullsFunctionDoc
66+
private typealias CommonFillNullsFunctionDoc = Nothing
6767

6868
/**
6969
* @include [CommonFillNullsFunctionDoc]
@@ -172,18 +172,18 @@ internal inline val Float?.isNA: Boolean get() = this == null || this.isNaN()
172172
internal interface FillNaNs {
173173

174174
/** @include [Update.Grammar] {@set [Update.UPDATE_OPERATION] [fillNaNs][fillNaNs]} */
175-
interface Grammar
175+
typealias Grammar = Nothing
176176

177177
/**
178178
* {@comment Version of [SelectingColumns] with correctly filled in examples}
179179
* @include [SelectingColumns] {@include [SetFillNaNsOperationArg]}
180180
*/
181-
interface FillNaNsSelectingOptions
181+
typealias FillNaNsSelectingOptions = Nothing
182182
}
183183

184184
/** {@set [SelectingColumns.OPERATION] [fillNaNs][fillNaNs]} */
185185
@ExcludeFromSources
186-
internal interface SetFillNaNsOperationArg
186+
internal typealias SetFillNaNsOperationArg = Nothing
187187

188188
/**
189189
* @include [FillNaNs] {@comment Description of the fillNaNs operation.}
@@ -193,7 +193,7 @@ internal interface SetFillNaNsOperationArg
193193
* ### This Fill NaNs Overload
194194
*/
195195
@ExcludeFromSources
196-
private interface CommonFillNaNsFunctionDoc
196+
private typealias CommonFillNaNsFunctionDoc = Nothing
197197

198198
/**
199199
* @include [CommonFillNaNsFunctionDoc]
@@ -247,18 +247,18 @@ public fun <T, C> DataFrame<T>.fillNaNs(vararg columns: ColumnReference<C>): Upd
247247
internal interface FillNA {
248248

249249
/** @include [Update.Grammar] {@set [Update.UPDATE_OPERATION] [fillNA][fillNA]} */
250-
interface Grammar
250+
typealias Grammar = Nothing
251251

252252
/**
253253
* {@comment Version of [SelectingColumns] with correctly filled in examples}
254254
* @include [SelectingColumns] {@include [SetFillNAOperationArg]}
255255
*/
256-
interface FillNASelectingOptions
256+
typealias FillNASelectingOptions = Nothing
257257
}
258258

259259
/** {@set [SelectingColumns.OPERATION] [fillNA][fillNA]} */
260260
@ExcludeFromSources
261-
internal interface SetFillNAOperationArg
261+
internal typealias SetFillNAOperationArg = Nothing
262262

263263
/**
264264
* @include [FillNA] {@comment Description of the fillNA operation.}
@@ -268,7 +268,7 @@ internal interface SetFillNAOperationArg
268268
* ### This Fill NA Overload
269269
*/
270270
@ExcludeFromSources
271-
private interface CommonFillNAFunctionDoc
271+
private typealias CommonFillNAFunctionDoc = Nothing
272272

273273
/**
274274
* @include [CommonFillNAFunctionDoc]
@@ -309,20 +309,19 @@ public fun <T, C> DataFrame<T>.fillNA(vararg columns: ColumnReference<C>): Updat
309309

310310
/** @param columns The [Columns Selector][ColumnsSelector] used to select the columns of this [DataFrame] to drop rows in. */
311311
@ExcludeFromSources
312-
private interface DropDslParam
312+
private typealias DropDslParam = Nothing
313313

314314
/** @param columns The [KProperties][KProperty] used to select the columns of this [DataFrame] to drop rows in. */
315315
@ExcludeFromSources
316-
private interface DropKPropertiesParam
316+
private typealias DropKPropertiesParam = Nothing
317317

318318
/** @param columns The [Strings][String] corresponding to the names of columns in this [DataFrame] to drop rows in. */
319319
@ExcludeFromSources
320-
private interface DropColumnNamesParam
320+
private typealias DropColumnNamesParam = Nothing
321321

322322
/** @param columns The [Column References][ColumnReference] used to select the columns of this [DataFrame] to drop rows in. */
323323
@ExcludeFromSources
324-
private interface DropColumnAccessorsParam
325-
324+
private typealias DropColumnAccessorsParam = Nothing
326325
// region dropNulls
327326

328327
/**
@@ -345,25 +344,25 @@ internal interface DropNulls {
345344
* If `true`, rows are dropped if all selected cells are `null`.
346345
* If `false`, rows are dropped if any of the selected cells is `null`.
347346
*/
348-
interface WhereAllNullParam
347+
typealias WhereAllNullParam = Nothing
349348

350349
/**
351350
* {@comment Version of [SelectingColumns] with correctly filled in examples}
352351
* @include [SelectingColumns] {@include [SetDropNullsOperationArg]}
353352
*/
354-
interface DropNullsSelectingOptions
353+
typealias DropNullsSelectingOptions = Nothing
355354
}
356355

357356
/** {@set [SelectingColumns.OPERATION] [dropNulls][dropNulls]} */
358357
@ExcludeFromSources
359-
private interface SetDropNullsOperationArg
358+
private typealias SetDropNullsOperationArg = Nothing
360359

361360
/**
362361
* @include [DropNulls] {@comment Description of the dropNulls operation.}
363362
* ### This Drop Nulls Overload
364363
*/
365364
@ExcludeFromSources
366-
private interface CommonDropNullsFunctionDoc
365+
private typealias CommonDropNullsFunctionDoc = Nothing
367366

368367
/**
369368
* @include [CommonDropNullsFunctionDoc]
@@ -466,25 +465,25 @@ internal interface DropNA {
466465
* If `true`, rows are dropped if all selected cells are [`NA`][NA].
467466
* If `false`, rows are dropped if any of the selected cells is [`NA`][NA].
468467
*/
469-
interface WhereAllNAParam
468+
typealias WhereAllNAParam = Nothing
470469

471470
/**
472471
* {@comment Version of [SelectingColumns] with correctly filled in examples}
473472
* @include [SelectingColumns] {@include [SetDropNAOperationArg]}
474473
*/
475-
interface DropNASelectingOptions
474+
typealias DropNASelectingOptions = Nothing
476475
}
477476

478477
/** {@set [SelectingColumns.OPERATION] [dropNA][dropNA]} */
479478
@ExcludeFromSources
480-
private interface SetDropNAOperationArg
479+
private typealias SetDropNAOperationArg = Nothing
481480

482481
/**
483482
* @include [DropNA] {@comment Description of the dropNA operation.}
484483
* ### This Drop NA Overload
485484
*/
486485
@ExcludeFromSources
487-
private interface CommonDropNAFunctionDoc
486+
private typealias CommonDropNAFunctionDoc = Nothing
488487

489488
/**
490489
* @include [CommonDropNAFunctionDoc]
@@ -581,25 +580,25 @@ internal interface DropNaNs {
581580
* If `true`, rows are dropped if all selected cells are [`NaN`][Double.isNaN].
582581
* If `false`, rows are dropped if any of the selected cells is [`NaN`][Double.isNaN].
583582
*/
584-
interface WhereAllNaNParam
583+
typealias WhereAllNaNParam = Nothing
585584

586585
/**
587586
* {@comment Version of [SelectingColumns] with correctly filled in examples}
588587
* @include [SelectingColumns] {@include [SetDropNaNsOperationArg]}
589588
*/
590-
interface DropNaNsSelectingOptions
589+
typealias DropNaNsSelectingOptions = Nothing
591590
}
592591

593592
/** {@set [SelectingColumns.OPERATION] [dropNaNs][dropNaNs]} */
594593
@ExcludeFromSources
595-
private interface SetDropNaNsOperationArg
594+
private typealias SetDropNaNsOperationArg = Nothing
596595

597596
/**
598597
* @include [DropNaNs] {@comment Description of the dropNaNs operation.}
599598
* ### This Drop NaNs Overload
600599
*/
601600
@ExcludeFromSources
602-
private interface CommonDropNaNsFunctionDoc
601+
private typealias CommonDropNaNsFunctionDoc = Nothing
603602

604603
/**
605604
* @include [CommonDropNaNsFunctionDoc]

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ public typealias AddExpression<T, R> = Selector<AddDataRow<T>, R>
178178
* For example, use `prev().newValue()` to access the new column value from the previous row.
179179
*/
180180
@ExcludeFromSources
181-
internal interface AddExpressionDocs
181+
internal typealias AddExpressionDocs = Nothing
182182

183183
/**
184184
* Creates a new column using an [AddExpression] and

0 commit comments

Comments
 (0)