Record Class BoundingBox

java.lang.Object
java.lang.Record
dev.hardwood.metadata.BoundingBox
Record Components:
xmin - x coordinate of bottom-left vertex
xmax - x coordinate of top-right vertex
ymin - y coordinate of bottom-left vertex
ymax - y coordinate of top-right vertex
zmin - minimum height of bounded volume, or null if absent
zmax - maximum height of bounded volume, or null if absent
mmin - minimum of a value in 4th dimension, or null if absent
mmax - maximum of a value in 4th dimension, or null if absent

public record BoundingBox(double xmin, double xmax, double ymin, double ymax, Double zmin, Double zmax, Double mmin, Double mmax) extends Record
See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
    BoundingBox(double xmin, double xmax, double ymin, double ymax, Double zmin, Double zmax, Double mmin, Double mmax)
    Creates an instance of a BoundingBox record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    Returns the value of the mmax record component.
    Returns the value of the mmin record component.
    final String
    Returns a string representation of this record class.
    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.
    Returns the value of the zmax record component.
    Returns the value of the zmin record component.

    Methods inherited from class Object

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

    • BoundingBox

      public BoundingBox(double xmin, double xmax, double ymin, double ymax, Double zmin, Double zmax, Double mmin, Double mmax)
      Creates an instance of a BoundingBox record class.
      Parameters:
      xmin - the value for the xmin record component
      xmax - the value for the xmax record component
      ymin - the value for the ymin 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

    • 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 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.
    • xmin

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

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

      public double ymin()
      Returns the value of the ymin record component.
      Returns:
      the value of the ymin 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