Skip to content

Add KDocs for the remaining column-type predicates in DataColumnType.kt #1997

Description

@zaleslaw

Add KDocs for the remaining column-type predicates in DataColumnType.kt

The file core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/api/DataColumnType.kt is partially documented. Add concise KDocs to the predicates that still lack them.

Already documented (leave as-is)

isNumber, isMixedNumber, isPrimitiveNumber, isPrimitiveOrMixedNumber, valuesAreComparable. (isComparable is deprecated with ERROR level — out of scope.)

Scope — not documented

  • AnyCol.isColumnGroup()
  • AnyCol.isFrameColumn()
  • AnyCol.isValueColumn()
  • AnyCol.isSubtypeOf(type: KType)
  • AnyCol.isSubtypeOf<T>() (reified)
  • AnyCol.isType<T>() (reified)
  • AnyCol.isList()

KDocs should explain

  • The column-kind checks (isColumnGroup / isFrameColumn / isValueColumn): each returns true when the column is of that kind (ColumnKind.Group / Frame / Value). Mention that they carry a Kotlin contract — a true result smart-casts the receiver to ColumnGroup<*> / FrameColumn<*> / ValueColumn<*>.
  • isSubtypeOf(type) / isSubtypeOf<T>(): returns true when the column's element type is a subtype of the given type, with nullability respected (a nullable column is not a subtype of a non-nullable type).
  • isType<T>(): returns true only when the column's element type is exactly T (no subtyping) — contrast with isSubtypeOf.
  • isList(): returns true when the column's element type class is List.

Acceptance criteria

  • All seven predicates listed under Scope have concise KDocs; the already-documented predicates are preserved.
  • The kind-check KDocs note the smart-cast contract.
  • The KDocs make the isSubtypeOf (subtype, nullability-aware) vs isType (exact type) distinction explicit.
  • No documentation is added for the deprecated isComparable.

Metadata

Metadata

Assignees

No one assigned

    Labels

    KDocsImprovements or additions to KDocs

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions