Interface ColumnObject.Builder<T>

Type Parameters:
T - the value type produced by the builder
All Superinterfaces:
Column.Builder
All Known Subinterfaces:
ColumnCategorical.Builder<T>
Enclosing interface:
ColumnObject<T>

public static interface ColumnObject.Builder<T> extends Column.Builder
Builder for nullable object columns.
  • Method Summary

    Modifier and Type
    Method
    Description
    add(CharSequence chars, int offset, int length)
    Appends a value directly from a character slice.
    add(T x)
    Appends a value to the column.
    Appends an unset row.
    Materialises the current builder contents as an immutable column.
    build(Column.Type transformedType)
    Builds the object column by parsing each distinct source value through the supplied target type parser.
    Returns the name that will be assigned to the built column.
    Returns the object column type produced by this builder.
    int
    Returns the number of rows currently accumulated by the builder.
  • Method Details

    • getName

      ColumnName getName()
      Description copied from interface: Column.Builder
      Returns the name that will be assigned to the built column.
      Specified by:
      getName in interface Column.Builder
      Returns:
      the target column name
    • getType

      Column.Type getType()
      Returns the object column type produced by this builder.
      Returns:
      builder type
    • add

      Appends a value to the column.
      Parameters:
      x - the value to append, which may be null
      Returns:
      this builder
    • add

      default ColumnObject.Builder<T> add(CharSequence chars, int offset, int length)
      Description copied from interface: Column.Builder
      Appends a value directly from a character slice.
      Specified by:
      add in interface Column.Builder
      Parameters:
      chars - the source text
      offset - the start offset
      length - the slice length
      Returns:
      this builder
    • build

      ColumnObject<T> build()
      Description copied from interface: Column.Builder
      Materialises the current builder contents as an immutable column.
      Specified by:
      build in interface Column.Builder
      Returns:
      the built column
    • build

      Column build(Column.Type transformedType)
      Builds the object column by parsing each distinct source value through the supplied target type parser. If the supplied target type is the same as the builder type, this behaves like build() and returns the column directly.
      Parameters:
      transformedType - the target column type
      Returns:
      an immutable column of the transformed type
    • addNull

      default ColumnObject.Builder<T> addNull()
      Appends an unset row.
      Returns:
      this builder
    • size

      int size()
      Returns the number of rows currently accumulated by the builder.
      Returns:
      the builder size