Record Class ShapefileHeader

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

public record ShapefileHeader(int fileCode, int fileLengthWords, int version, ShapeType shapeType, double xmin, double ymin, double xmax, double ymax, double zmin, double zmax, double mmin, double mmax) extends Record
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    ShapefileHeader(int fileCode, int fileLengthWords, int version, ShapeType shapeType, double xmin, double ymin, double xmax, double ymax, double zmin, double zmax, double mmin, double mmax)
    Creates an instance of a ShapefileHeader record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    final boolean
    Indicates whether some other object is "equal to" this one.
    int
    Returns the value of the fileCode record component.
    int
    Returns the value of the fileLengthWords record component.
    final int
    Returns a hash code value for this object.
    double
    Returns the value of the mmax record component.
    double
    Returns the value of the mmin record component.
    read(FileChannel channel)
     
    Returns the value of the shapeType record component.
    final String
    Returns a string representation of this record class.
    void
     
    void
     
    int
    Returns the value of the version record component.
    void
    write(FileChannel channel)
     
    double
    Returns the value of the xmax record component.
    double
    Returns the value of the xmin record component.
    double
    Returns the value of the ymax record component.
    double
    Returns the value of the ymin record component.
    double
    Returns the value of the zmax record component.
    double
    Returns the value of the zmin record component.

    Methods inherited from class java.lang.Object

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

  • Constructor Details

    • ShapefileHeader

      public ShapefileHeader(int fileCode, int fileLengthWords, int version, ShapeType shapeType, double xmin, double ymin, double xmax, double ymax, double zmin, double zmax, double mmin, double mmax)
      Creates an instance of a ShapefileHeader record class.
      Parameters:
      fileCode - the value for the fileCode record component
      fileLengthWords - the value for the fileLengthWords record component
      version - the value for the version record component
      shapeType - the value for the shapeType record component
      xmin - the value for the xmin record component
      ymin - the value for the ymin record component
      xmax - the value for the xmax record component
      ymax - the value for the ymax record component
      zmin - the value for the zmin record component
      zmax - the value for the zmax record component
      mmin - the value for the mmin record component
      mmax - the value for the mmax record component
  • Method Details

    • read

      public static ShapefileHeader read(FileChannel channel) throws IOException, ShapefileMappingException
      Throws:
      IOException
      ShapefileMappingException
    • write

      public void write(FileChannel channel) throws IOException, ShapefileMappingException
      Throws:
      IOException
      ShapefileMappingException
    • validateMainFileHeader

      public void validateMainFileHeader() throws ShapefileMappingException
      Throws:
      ShapefileMappingException
    • validateIndexFileHeader

      public void validateIndexFileHeader() throws ShapefileMappingException
      Throws:
      ShapefileMappingException
    • 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.
    • fileCode

      public int fileCode()
      Returns the value of the fileCode record component.
      Returns:
      the value of the fileCode record component
    • fileLengthWords

      public int fileLengthWords()
      Returns the value of the fileLengthWords record component.
      Returns:
      the value of the fileLengthWords record component
    • version

      public int version()
      Returns the value of the version record component.
      Returns:
      the value of the version record component
    • shapeType

      public ShapeType shapeType()
      Returns the value of the shapeType record component.
      Returns:
      the value of the shapeType record component
    • xmin

      public double xmin()
      Returns the value of the xmin record component.
      Returns:
      the value of the xmin record component
    • ymin

      public double ymin()
      Returns the value of the ymin record component.
      Returns:
      the value of the ymin record component
    • xmax

      public double xmax()
      Returns the value of the xmax record component.
      Returns:
      the value of the xmax record component
    • ymax

      public double ymax()
      Returns the value of the ymax record component.
      Returns:
      the value of the ymax record component
    • zmin

      public double zmin()
      Returns the value of the zmin record component.
      Returns:
      the value of the zmin record component
    • zmax

      public double zmax()
      Returns the value of the zmax record component.
      Returns:
      the value of the zmax record component
    • mmin

      public double mmin()
      Returns the value of the mmin record component.
      Returns:
      the value of the mmin record component
    • mmax

      public double mmax()
      Returns the value of the mmax record component.
      Returns:
      the value of the mmax record component