Skip to content

Commit 04bf223

Browse files
committed
ColumnDataHolder now implements List and supports nullable primitives; to be stored efficiently
1 parent bfaaec8 commit 04bf223

File tree

4 files changed

+342
-57
lines changed

4 files changed

+342
-57
lines changed

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

+3-11
Original file line numberDiff line numberDiff line change
@@ -15,28 +15,20 @@ import org.jetbrains.kotlinx.dataframe.impl.columns.UBYTE
1515
import org.jetbrains.kotlinx.dataframe.impl.columns.UINT
1616
import org.jetbrains.kotlinx.dataframe.impl.columns.ULONG
1717
import org.jetbrains.kotlinx.dataframe.impl.columns.USHORT
18-
import org.jetbrains.kotlinx.dataframe.impl.columns.ofCollection
1918
import org.jetbrains.kotlinx.dataframe.impl.columns.ofBoxedArray
19+
import org.jetbrains.kotlinx.dataframe.impl.columns.ofCollection
2020
import org.jetbrains.kotlinx.dataframe.impl.columns.ofPrimitiveArray
2121
import kotlin.reflect.KType
2222
import kotlin.reflect.typeOf
2323

2424
/**
25-
* Represents the contents of a column, however it may be implemented.
25+
* Represents the contents of a column; however, it may be implemented.
2626
* The default implementation is found at [ColumnDataHolderImpl].
2727
*/
28-
public interface ColumnDataHolder<T> : Iterable<T> {
29-
30-
public val size: Int
28+
public interface ColumnDataHolder<T> : List<T> {
3129

3230
public fun toSet(): Set<T>
3331

34-
public fun toList(): List<T>
35-
36-
public fun contains(value: T): Boolean
37-
38-
public operator fun get(index: Int): T
39-
4032
public operator fun get(range: IntRange): List<T>
4133

4234
public val distinct: Lazy<Set<T>>

0 commit comments

Comments
 (0)