java.lang.Object
io.github.astrapisixtynine.csv.CsvBean
Alle implementierten Schnittstellen:
Serializable, Cloneable

public class CsvBean extends Object implements Serializable, Cloneable
The `CsvBean` class represents a structured data model for CSV files. It includes headers, column types, lines of data, and supports operations like cloning, equality comparison, and fluent construction using the builder pattern.
Siehe auch:
  • Konstruktordetails

    • CsvBean

      public CsvBean()
      Default constructor.
    • CsvBean

      public CsvBean(String[] headers, String[] columnTypes, List<String[]> lines)
      Constructs a new `CsvBean` object with specified headers, column types, and lines.
      Parameter:
      headers - the headers of the CSV
      columnTypes - the types of each column
      lines - the lines of data in the CSV
    • CsvBean

      public CsvBean(String[] headers, String[] columnTypes, String[] columnTypesEdit, List<String[]> lines)
      Constructs a new `CsvBean` object with specified headers, column types, editable types, and lines.
      Parameter:
      headers - the headers of the CSV
      columnTypes - the types of each column
      columnTypesEdit - the editable types of each column
      lines - the lines of data in the CSV
    • CsvBean

      public CsvBean(String[] columnTypes, String[] columnTypesEdit, String[] headers, Map<Integer,Integer> lineOrder, List<String[]> lines)
      Constructs a new `CsvBean` object with specified column types, editable types, headers, line order, and lines.
      Parameter:
      columnTypes - the types of each column
      columnTypesEdit - the editable types of each column
      headers - the headers of the CSV
      lineOrder - the order of lines in the CSV
      lines - the lines of data in the CSV
  • Methodendetails

    • builder

      public static CsvBean.CsvBeanBuilder builder()
      Creates a builder for constructing `CsvBean` objects.
      Gibt zurück:
      a new `CsvBeanBuilder` instance
    • clone

      public Object clone()
      Setzt außer Kraft:
      clone in Klasse Object
    • equals

      public boolean equals(Object o)
      Setzt außer Kraft:
      equals in Klasse Object
    • getColumnTypes

      public String[] getColumnTypes()
      Gets the types of each column in the CSV.
      Gibt zurück:
      an array representing the types of each column
    • setColumnTypes

      public void setColumnTypes(String[] columnTypes)
      Sets the types of each column in the CSV.
      Parameter:
      columnTypes - an array representing the types of each column
    • getColumnTypesEdit

      public String[] getColumnTypesEdit()
      Gets the editable types of each column in the CSV.
      Gibt zurück:
      an array representing the editable types of each column
    • setColumnTypesEdit

      public void setColumnTypesEdit(String[] columnTypesEdit)
      Sets the editable types of each column in the CSV.
      Parameter:
      columnTypesEdit - an array representing the editable types of each column
    • getHeaders

      public String[] getHeaders()
      Gets the headers of the CSV.
      Gibt zurück:
      an array representing the headers of the CSV
    • setHeaders

      public void setHeaders(String[] headers)
      Sets the headers of the CSV.
      Parameter:
      headers - an array representing the headers of the CSV
    • getLineOrder

      public Map<Integer,Integer> getLineOrder()
      Gets the order of lines in the CSV.
      Gibt zurück:
      a map representing the order of lines in the CSV
    • setLineOrder

      public void setLineOrder(Map<Integer,Integer> lineOrder)
      Sets the order of lines in the CSV.
      Parameter:
      lineOrder - a map representing the order of lines in the CSV
    • getLines

      public List<String[]> getLines()
      Gets the lines of data in the CSV.
      Gibt zurück:
      a list containing arrays representing the lines of data in the CSV
    • setLines

      public void setLines(List<String[]> lines)
      Sets the lines of data in the CSV.
      Parameter:
      lines - a list containing arrays representing the lines of data in the CSV
    • hashCode

      public int hashCode()
      Setzt außer Kraft:
      hashCode in Klasse Object
    • toBuilder

      public CsvBean.CsvBeanBuilder toBuilder()
      Creates a builder initialized with the current `CsvBean` instance's properties.
      Gibt zurück:
      a new `CsvBeanBuilder` initialized with the current instance's properties
    • toString

      public String toString()
      Returns a string representation of the `CsvBean` 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 `CsvBean` object