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 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
    • buildAs

      Column buildAs(Column.Type transformedType)
      Builds a column by parsing this builder's source values as the supplied target type. The returned column follows transformedType, not necessarily this object builder's interface. For example, a string-backed object builder may produce a primitive column when the target type is primitive. If the supplied target type is the same as the builder type, this behaves like build() and returns the object column directly.
      Parameters:
      transformedType - the target column type
      Returns:
      an immutable column whose logical type is transformedType
    • 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