java.lang.Object
com.io7m.jregions.core.unparameterized.volumes.VolumeD
All Implemented Interfaces:
VolumeSizeValuesDType, VolumeDType, VolumeValuesDType

public final class VolumeD extends Object implements VolumeDType

A volume with double coordinates.

The coordinates of the area are given in half-closed form. That is, minimumX() refers to the minimum inclusive value on the X axis, and maximumX() refers to the maximum exclusive value on the X axis. Likewise for the Y and Z axes.

  • Method Details

    • minimumX

      public double minimumX()
      Specified by:
      minimumX in interface VolumeDType
      Specified by:
      minimumX in interface VolumeValuesDType
      Returns:
      The value of the minimumX attribute
    • maximumX

      public double maximumX()
      Specified by:
      maximumX in interface VolumeDType
      Specified by:
      maximumX in interface VolumeValuesDType
      Returns:
      The value of the maximumX attribute
    • minimumY

      public double minimumY()
      Specified by:
      minimumY in interface VolumeDType
      Specified by:
      minimumY in interface VolumeValuesDType
      Returns:
      The value of the minimumY attribute
    • maximumY

      public double maximumY()
      Specified by:
      maximumY in interface VolumeDType
      Specified by:
      maximumY in interface VolumeValuesDType
      Returns:
      The value of the maximumY attribute
    • minimumZ

      public double minimumZ()
      Specified by:
      minimumZ in interface VolumeDType
      Specified by:
      minimumZ in interface VolumeValuesDType
      Returns:
      The value of the minimumZ attribute
    • maximumZ

      public double maximumZ()
      Specified by:
      maximumZ in interface VolumeDType
      Specified by:
      maximumZ in interface VolumeValuesDType
      Returns:
      The value of the maximumZ attribute
    • withMinimumX

      public final VolumeD withMinimumX(double value)
      Copy the current immutable object by setting a value for the minimumX attribute. A value strict bits equality used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for minimumX
      Returns:
      A modified copy of the this object
    • withMaximumX

      public final VolumeD withMaximumX(double value)
      Copy the current immutable object by setting a value for the maximumX attribute. A value strict bits equality used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for maximumX
      Returns:
      A modified copy of the this object
    • withMinimumY

      public final VolumeD withMinimumY(double value)
      Copy the current immutable object by setting a value for the minimumY attribute. A value strict bits equality used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for minimumY
      Returns:
      A modified copy of the this object
    • withMaximumY

      public final VolumeD withMaximumY(double value)
      Copy the current immutable object by setting a value for the maximumY attribute. A value strict bits equality used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for maximumY
      Returns:
      A modified copy of the this object
    • withMinimumZ

      public final VolumeD withMinimumZ(double value)
      Copy the current immutable object by setting a value for the minimumZ attribute. A value strict bits equality used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for minimumZ
      Returns:
      A modified copy of the this object
    • withMaximumZ

      public final VolumeD withMaximumZ(double value)
      Copy the current immutable object by setting a value for the maximumZ attribute. A value strict bits equality used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for maximumZ
      Returns:
      A modified copy of the this object
    • equals

      public boolean equals(Object another)
      This instance is equal to all instances of VolumeD that have equal attribute values.
      Overrides:
      equals in class Object
      Returns:
      true if this is equal to another instance
    • hashCode

      public int hashCode()
      Computes a hash code from attributes: minimumX, maximumX, minimumY, maximumY, minimumZ, maximumZ.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

      public String toString()
      Prints the immutable value VolumeD with attribute values.
      Overrides:
      toString in class Object
      Returns:
      A string representation of the value
    • of

      public static VolumeD of(double minimumX, double maximumX, double minimumY, double maximumY, double minimumZ, double maximumZ)
      Construct a new immutable VolumeD instance.
      Parameters:
      minimumX - The value for the minimumX attribute
      maximumX - The value for the maximumX attribute
      minimumY - The value for the minimumY attribute
      maximumY - The value for the maximumY attribute
      minimumZ - The value for the minimumZ attribute
      maximumZ - The value for the maximumZ attribute
      Returns:
      An immutable VolumeD instance
    • copyOf

      public static VolumeD copyOf(VolumeDType instance)
      Creates an immutable copy of a VolumeDType value. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.
      Parameters:
      instance - The instance to copy
      Returns:
      A copied immutable VolumeD instance
    • builder

      public static VolumeD.Builder builder()
      Creates a builder for VolumeD.
       VolumeD.builder()
          .setMinimumX(double) // required minimumX
          .setMaximumX(double) // required maximumX
          .setMinimumY(double) // required minimumY
          .setMaximumY(double) // required maximumY
          .setMinimumZ(double) // required minimumZ
          .setMaximumZ(double) // required maximumZ
          .build();
       
      Returns:
      A new VolumeD builder