Record Class CsvIndex

java.lang.Object
java.lang.Record
de.siegmar.fastcsv.reader.CsvIndex
Record Components:
bomHeaderLength - The length of an optional BOM header.
fileSize - The CSV file size this index was built for.
fieldSeparator - The field separator used when building this index.
quoteCharacter - The quote character used when building this index.
commentStrategy - The comment strategy used when building this index.
commentCharacter - The comment character used when building this index.
recordCount - The total number of records the CSV file contains this index was built for.
pages - The pages this index is partitioned.
All Implemented Interfaces:
Serializable

public record CsvIndex(int bomHeaderLength, long fileSize, byte fieldSeparator, byte quoteCharacter, CommentStrategy commentStrategy, byte commentCharacter, long recordCount, List<CsvIndex.CsvPage> pages) extends Record implements Serializable

Index built by IndexedCsvReader to access large CSV data files.

Even if the constructor is public (mandatory for record classes), this class is not intended to be instantiated directly!

See Also:
  • Constructor Details

    • CsvIndex

      public CsvIndex(int bomHeaderLength, long fileSize, byte fieldSeparator, byte quoteCharacter, CommentStrategy commentStrategy, byte commentCharacter, long recordCount, List<CsvIndex.CsvPage> pages)
      Constructor for the CsvIndex class.
      Throws:
      NullPointerException - if the commentStrategy or pages is null
  • Method Details

    • toString

      public String toString()
      Returns string representation of this index without the pages themselves.
      Specified by:
      toString in class Record
      Returns:
      string representation of this index without the pages themselves
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • bomHeaderLength

      public int bomHeaderLength()
      Returns the value of the bomHeaderLength record component.
      Returns:
      the value of the bomHeaderLength record component
    • fileSize

      public long fileSize()
      Returns the value of the fileSize record component.
      Returns:
      the value of the fileSize record component
    • fieldSeparator

      public byte fieldSeparator()
      Returns the value of the fieldSeparator record component.
      Returns:
      the value of the fieldSeparator record component
    • quoteCharacter

      public byte quoteCharacter()
      Returns the value of the quoteCharacter record component.
      Returns:
      the value of the quoteCharacter record component
    • commentStrategy

      public CommentStrategy commentStrategy()
      Returns the value of the commentStrategy record component.
      Returns:
      the value of the commentStrategy record component
    • commentCharacter

      public byte commentCharacter()
      Returns the value of the commentCharacter record component.
      Returns:
      the value of the commentCharacter record component
    • recordCount

      public long recordCount()
      Returns the value of the recordCount record component.
      Returns:
      the value of the recordCount record component
    • pages

      public List<CsvIndex.CsvPage> pages()
      Returns the value of the pages record component.
      Returns:
      the value of the pages record component