Record Class DbfHeader

java.lang.Object
java.lang.Record
ch.so.agi.gretl.internal.shapefile.core.DbfHeader

public record DbfHeader(byte version, int lastUpdateYear, int lastUpdateMonth, int lastUpdateDay, int recordCount, int headerLength, int recordLength, List<DbfField> fields) extends Record
  • Constructor Summary

    Constructors
    Constructor
    Description
    DbfHeader(byte version, int lastUpdateYear, int lastUpdateMonth, int lastUpdateDay, int recordCount, int headerLength, int recordLength, List<DbfField> fields)
    Creates an instance of a DbfHeader record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    final boolean
    Indicates whether some other object is "equal to" this one.
    Returns the value of the fields record component.
    final int
    Returns a hash code value for this object.
    int
    Returns the value of the headerLength record component.
    int
    Returns the value of the lastUpdateDay record component.
    int
    Returns the value of the lastUpdateMonth record component.
    int
    Returns the value of the lastUpdateYear record component.
    int
    Returns the value of the recordCount record component.
    int
    Returns the value of the recordLength record component.
    final String
    Returns a string representation of this record class.
    byte
    Returns the value of the version record component.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • DbfHeader

      public DbfHeader(byte version, int lastUpdateYear, int lastUpdateMonth, int lastUpdateDay, int recordCount, int headerLength, int recordLength, List<DbfField> fields)
      Creates an instance of a DbfHeader record class.
      Parameters:
      version - the value for the version record component
      lastUpdateYear - the value for the lastUpdateYear record component
      lastUpdateMonth - the value for the lastUpdateMonth record component
      lastUpdateDay - the value for the lastUpdateDay record component
      recordCount - the value for the recordCount record component
      headerLength - the value for the headerLength record component
      recordLength - the value for the recordLength record component
      fields - the value for the fields record component
  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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 '=='.
      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.
    • version

      public byte version()
      Returns the value of the version record component.
      Returns:
      the value of the version record component
    • lastUpdateYear

      public int lastUpdateYear()
      Returns the value of the lastUpdateYear record component.
      Returns:
      the value of the lastUpdateYear record component
    • lastUpdateMonth

      public int lastUpdateMonth()
      Returns the value of the lastUpdateMonth record component.
      Returns:
      the value of the lastUpdateMonth record component
    • lastUpdateDay

      public int lastUpdateDay()
      Returns the value of the lastUpdateDay record component.
      Returns:
      the value of the lastUpdateDay record component
    • recordCount

      public int recordCount()
      Returns the value of the recordCount record component.
      Returns:
      the value of the recordCount record component
    • headerLength

      public int headerLength()
      Returns the value of the headerLength record component.
      Returns:
      the value of the headerLength record component
    • recordLength

      public int recordLength()
      Returns the value of the recordLength record component.
      Returns:
      the value of the recordLength record component
    • fields

      public List<DbfField> fields()
      Returns the value of the fields record component.
      Returns:
      the value of the fields record component