Klasse CsvBean.CsvBeanBuilder

java.lang.Object
io.github.astrapisixtynine.csv.CsvBean.CsvBeanBuilder
Umschließende Klasse:
CsvBean

public static class CsvBean.CsvBeanBuilder extends Object
Builder class for constructing `CsvBean` objects.
  • Methodendetails

    • build

      public CsvBean build()
      Constructs a new `CsvBean` object based on the current builder state.
      Gibt zurück:
      a new `CsvBean` object
    • columnTypes

      public CsvBean.CsvBeanBuilder columnTypes(String[] columnTypes)
      Sets the types of each column for the `CsvBean` object being built.
      Parameter:
      columnTypes - an array representing the types of each column
      Gibt zurück:
      the current `CsvBeanBuilder` instance
    • columnTypesEdit

      public CsvBean.CsvBeanBuilder columnTypesEdit(String[] columnTypesEdit)
      Sets the editable types of each column for the `CsvBean` object being built.
      Parameter:
      columnTypesEdit - an array representing the editable types of each column
      Gibt zurück:
      the current `CsvBeanBuilder` instance
    • headers

      public CsvBean.CsvBeanBuilder headers(String[] headers)
      Sets the headers for the `CsvBean` object being built.
      Parameter:
      headers - an array representing the headers of the CSV
      Gibt zurück:
      the current `CsvBeanBuilder` instance
    • lineOrder

      public CsvBean.CsvBeanBuilder lineOrder(Map<Integer,Integer> lineOrder)
      Sets the line order for the `CsvBean` object being built.
      Parameter:
      lineOrder - a map representing the order of lines in the CSV
      Gibt zurück:
      the current `CsvBeanBuilder` instance
    • lines

      public CsvBean.CsvBeanBuilder lines(List<String[]> lines)
      Sets the lines of data for the `CsvBean` object being built.
      Parameter:
      lines - a list containing arrays representing the lines of data in the CSV
      Gibt zurück:
      the current `CsvBeanBuilder` instance
    • toString

      public String toString()
      Returns a string representation of the `CsvBeanBuilder` object, showing its current column types, editable types, headers, line order, and lines of data.
      Setzt außer Kraft:
      toString in Klasse Object
      Gibt zurück:
      a string representation of the `CsvBeanBuilder` object